<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE MultiWayIf #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-- | Module for detecting if recompilation is required</span><span>
</span><span id="line-5"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Iface.Recomp</span><span>
</span><span id="line-6"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#checkOldIface"><span class="hs-identifier">checkOldIface</span></a></span><span>
</span><span id="line-7"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier">RecompileRequired</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-8"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier">recompileRequired</span></a></span><span>
</span><span id="line-9"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#addFingerprints"><span class="hs-identifier">addFingerprints</span></a></span><span>
</span><span id="line-10"></span><span>   </span><span class="hs-special">)</span><span>
</span><span id="line-11"></span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html"><span class="hs-identifier">GHC.Iface.Syntax</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.Binary.html"><span class="hs-identifier">GHC.Iface.Recomp.Binary</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html"><span class="hs-identifier">GHC.Iface.Load</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.Flags.html"><span class="hs-identifier">GHC.Iface.Recomp.Flags</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Annotations.html"><span class="hs-identifier">GHC.Types.Annotations</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Monad.html"><span class="hs-identifier">GHC.Tc.Utils.Monad</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.html"><span class="hs-identifier">GHC.Hs</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Finder.html"><span class="hs-identifier">GHC.Driver.Finder</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Directed.html"><span class="hs-identifier">GHC.Data.Graph.Directed</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Outputable</span></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Utils</span></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#eqListBy"><span class="hs-identifier">eqListBy</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Fingerprint.html"><span class="hs-identifier">GHC.Utils.Fingerprint</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Exception.html"><span class="hs-identifier">GHC.Utils.Exception</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.State.html"><span class="hs-identifier">GHC.Unit.State</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Function.html#"><span class="hs-identifier">Data.Function</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier">find</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier">sortBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#sort"><span class="hs-identifier">sort</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Set.html#"><span class="hs-identifier">Data.Set</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Set</span></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier">Word64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html"><span class="hs-identifier">GHC.Driver.Plugins</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier">PluginRecompile</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier">PluginWithArgs</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#pluginRecompile%27"><span class="hs-identifier">pluginRecompile'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier">plugins</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-comment">--Qualified import so we can define a Semigroup instance</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- but it doesn't clash with Outputable.&lt;&gt;</span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.Semigroup.html#"><span class="hs-identifier">Data.Semigroup</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-comment">{-
  -----------------------------------------------
          Recompilation checking
  -----------------------------------------------

A complete description of how recompilation checking works can be
found in the wiki commentary:

 https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance

Please read the above page for a top-down description of how this all
works.  Notes below cover specific issues related to the implementation.

Basic idea:

  * In the mi_usages information in an interface, we record the
    fingerprint of each free variable of the module

  * In mkIface, we compute the fingerprint of each exported thing A.f.
    For each external thing that A.f refers to, we include the fingerprint
    of the external reference when computing the fingerprint of A.f.  So
    if anything that A.f depends on changes, then A.f's fingerprint will
    change.
    Also record any dependent files added with
      * addDependentFile
      * #include
      * -optP-include

  * In checkOldIface we compare the mi_usages for the module with
    the actual fingerprint for all each thing recorded in mi_usages
-}</span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-keyword">data</span><span> </span><span id="RecompileRequired"><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-var">RecompileRequired</span></a></span></span><span>
</span><span id="line-90"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="UpToDate"><span class="annot"><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span></span><span>
</span><span id="line-91"></span><span>       </span><span class="hs-comment">-- ^ everything is up to date, recompilation is not required</span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="MustCompile"><span class="annot"><a href="GHC.Iface.Recomp.html#MustCompile"><span class="hs-identifier hs-var">MustCompile</span></a></span></span><span>
</span><span id="line-93"></span><span>       </span><span class="hs-comment">-- ^ The .hs file has been touched, or the .o/.hi file does not exist</span><span>
</span><span id="line-94"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="RecompBecause"><span class="annot"><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-95"></span><span>       </span><span class="hs-comment">-- ^ The .o/.hi files are up to date, but something else has changed</span><span>
</span><span id="line-96"></span><span>       </span><span class="hs-comment">-- to force recompilation; the String says what (one-line summary)</span><span>
</span><span id="line-97"></span><span>   </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621681177882"><span id="local-6989586621681177886"><span class="annot"><span class="annottext">RecompileRequired -&gt; RecompileRequired -&gt; Bool
(RecompileRequired -&gt; RecompileRequired -&gt; Bool)
-&gt; (RecompileRequired -&gt; RecompileRequired -&gt; Bool)
-&gt; Eq RecompileRequired
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: RecompileRequired -&gt; RecompileRequired -&gt; Bool
$c/= :: RecompileRequired -&gt; RecompileRequired -&gt; Bool
== :: RecompileRequired -&gt; RecompileRequired -&gt; Bool
$c== :: RecompileRequired -&gt; RecompileRequired -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681177875"><span id="local-6989586621681177877"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-100"></span><span>  </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span> </span><span id="local-6989586621681177873"><span class="annot"><span class="annottext">&lt;&gt; :: RecompileRequired -&gt; RecompileRequired -&gt; RecompileRequired
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span id="local-6989586621681177872"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177872"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177872"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-101"></span><span>  </span><span id="local-6989586621681177871"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177871"><span class="hs-identifier hs-var">mc</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177871"><span class="hs-identifier hs-var">mc</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681177864"><span id="local-6989586621681177866"><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-104"></span><span>  </span><span id="local-6989586621681177862"><span class="annot"><span class="annottext">mempty :: RecompileRequired
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span class="annot"><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-type">recompileRequired</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-107"></span><span id="recompileRequired"><span class="annot"><span class="annottext">recompileRequired :: RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var hs-var">recompileRequired</span></a></span></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-108"></span><span class="annot"><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span class="hs-comment">-- | Top level function to check if the version of an old interface file</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- is equivalent to the current source file the user asked us to compile.</span><span>
</span><span id="line-112"></span><span class="hs-comment">-- If the same, we can avoid recompilation. We return a tuple where the</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- first element is a bool saying if we should recompile the object file</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- and the second is maybe the interface file, where Nothing means to</span><span>
</span><span id="line-115"></span><span class="hs-comment">-- rebuild the interface file and not use the existing one.</span><span>
</span><span id="line-116"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkOldIface"><span class="hs-identifier hs-type">checkOldIface</span></a></span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#SourceModified"><span class="hs-identifier hs-type">SourceModified</span></a></span><span>
</span><span id="line-120"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>         </span><span class="hs-comment">-- Old interface from compilation manager, if any</span><span>
</span><span id="line-121"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span id="checkOldIface"><span class="annot"><span class="annottext">checkOldIface :: HscEnv
-&gt; ModSummary
-&gt; SourceModified
-&gt; Maybe ModIface
-&gt; IO (RecompileRequired, Maybe ModIface)
</span><a href="GHC.Iface.Recomp.html#checkOldIface"><span class="hs-identifier hs-var hs-var">checkOldIface</span></a></span></span><span> </span><span id="local-6989586621681177861"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177861"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177860"><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177860"><span class="hs-identifier hs-var">mod_summary</span></a></span></span><span> </span><span id="local-6989586621681177859"><span class="annot"><span class="annottext">SourceModified
</span><a href="#local-6989586621681177859"><span class="hs-identifier hs-var">source_modified</span></a></span></span><span> </span><span id="local-6989586621681177858"><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177858"><span class="hs-identifier hs-var">maybe_iface</span></a></span></span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177857"><span class="annot"><span class="annottext">dflags :: DynFlags
</span><a href="#local-6989586621681177857"><span class="hs-identifier hs-var hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177861"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-125"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; String -&gt; IO ()
</span><a href="GHC.Utils.Error.html#showPass"><span class="hs-identifier hs-var">showPass</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177857"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-126"></span><span>            </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Checking old interface for &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-127"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Module -&gt; String
forall a. Outputable a =&gt; DynFlags -&gt; a -&gt; String
</span><a href="GHC.Utils.Outputable.html#showPpr"><span class="hs-identifier hs-var">showPpr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177857"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">(Module -&gt; String) -&gt; Module -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; Module
</span><a href="GHC.Driver.Types.html#ms_mod"><span class="hs-identifier hs-var hs-var">ms_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177860"><span class="hs-identifier hs-var">mod_summary</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-128"></span><span>              </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; (use -ddump-hi-diffs for more details)&quot;</span></span><span>
</span><span id="line-129"></span><span>        </span><span class="annot"><span class="annottext">SDoc
-&gt; HscEnv
-&gt; IfG (RecompileRequired, Maybe ModIface)
-&gt; IO (RecompileRequired, Maybe ModIface)
forall a. SDoc -&gt; HscEnv -&gt; IfG a -&gt; IO a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceCheck"><span class="hs-identifier hs-var">initIfaceCheck</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;checkOldIface&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177861"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">(IfG (RecompileRequired, Maybe ModIface)
 -&gt; IO (RecompileRequired, Maybe ModIface))
-&gt; IfG (RecompileRequired, Maybe ModIface)
-&gt; IO (RecompileRequired, Maybe ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-130"></span><span>            </span><span class="annot"><span class="annottext">HscEnv
-&gt; ModSummary
-&gt; SourceModified
-&gt; Maybe ModIface
-&gt; IfG (RecompileRequired, Maybe ModIface)
</span><a href="GHC.Iface.Recomp.html#check_old_iface"><span class="hs-identifier hs-var">check_old_iface</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177861"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177860"><span class="hs-identifier hs-var">mod_summary</span></a></span><span> </span><span class="annot"><span class="annottext">SourceModified
</span><a href="#local-6989586621681177859"><span class="hs-identifier hs-var">source_modified</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177858"><span class="hs-identifier hs-var">maybe_iface</span></a></span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span class="annot"><a href="GHC.Iface.Recomp.html#check_old_iface"><span class="hs-identifier hs-type">check_old_iface</span></a></span><span>
</span><span id="line-133"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-134"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span>
</span><span id="line-135"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#SourceModified"><span class="hs-identifier hs-type">SourceModified</span></a></span><span>
</span><span id="line-136"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-137"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span id="check_old_iface"><span class="annot"><span class="annottext">check_old_iface :: HscEnv
-&gt; ModSummary
-&gt; SourceModified
-&gt; Maybe ModIface
-&gt; IfG (RecompileRequired, Maybe ModIface)
</span><a href="GHC.Iface.Recomp.html#check_old_iface"><span class="hs-identifier hs-var hs-var">check_old_iface</span></a></span></span><span> </span><span id="local-6989586621681177849"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177849"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177848"><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177848"><span class="hs-identifier hs-var">mod_summary</span></a></span></span><span> </span><span id="local-6989586621681177847"><span class="annot"><span class="annottext">SourceModified
</span><a href="#local-6989586621681177847"><span class="hs-identifier hs-var">src_modified</span></a></span></span><span> </span><span id="local-6989586621681177846"><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177846"><span class="hs-identifier hs-var">maybe_iface</span></a></span></span><span>
</span><span id="line-140"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177845"><span class="annot"><span class="annottext">dflags :: DynFlags
</span><a href="#local-6989586621681177845"><span class="hs-identifier hs-var hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177849"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-141"></span><span>        </span><span id="local-6989586621681177841"><span class="annot"><span class="annottext">getIface :: IOEnv (Env m n) (Maybe ModIface)
</span><a href="#local-6989586621681177841"><span class="hs-identifier hs-var hs-var">getIface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-142"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177846"><span class="hs-identifier hs-var">maybe_iface</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-143"></span><span>                </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-144"></span><span>                    </span><span class="annot"><span class="annottext">SDoc -&gt; TcRnIf m n ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;We already have the old interface for&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-145"></span><span>                      </span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModSummary -&gt; Module
</span><a href="GHC.Driver.Types.html#ms_mod"><span class="hs-identifier hs-var hs-var">ms_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177848"><span class="hs-identifier hs-var">mod_summary</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>                    </span><span class="annot"><span class="annottext">Maybe ModIface -&gt; IOEnv (Env m n) (Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177846"><span class="hs-identifier hs-var">maybe_iface</span></a></span><span>
</span><span id="line-147"></span><span>                </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env m n) (Maybe ModIface)
forall {gbl} {lcl}. IOEnv (Env gbl lcl) (Maybe ModIface)
</span><a href="#local-6989586621681177837"><span class="hs-identifier hs-var">loadIface</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span>        </span><span id="local-6989586621681177837"><span class="annot"><span class="annottext">loadIface :: IOEnv (Env gbl lcl) (Maybe ModIface)
</span><a href="#local-6989586621681177837"><span class="hs-identifier hs-var hs-var">loadIface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-150"></span><span>             </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177830"><span class="annot"><span class="annottext">iface_path :: String
</span><a href="#local-6989586621681177830"><span class="hs-identifier hs-var hs-var">iface_path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; String
</span><a href="GHC.Driver.Types.html#msHiFilePath"><span class="hs-identifier hs-var">msHiFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177848"><span class="hs-identifier hs-var">mod_summary</span></a></span><span>
</span><span id="line-151"></span><span>             </span><span id="local-6989586621681177828"><span class="annot"><span class="annottext">MaybeErr SDoc ModIface
</span><a href="#local-6989586621681177828"><span class="hs-identifier hs-var">read_result</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Module -&gt; String -&gt; TcRnIf gbl lcl (MaybeErr SDoc ModIface)
forall gbl lcl.
Module -&gt; String -&gt; TcRnIf gbl lcl (MaybeErr SDoc ModIface)
</span><a href="GHC.Iface.Load.html#readIface"><span class="hs-identifier hs-var">readIface</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModSummary -&gt; Module
</span><a href="GHC.Driver.Types.html#ms_mod"><span class="hs-identifier hs-var hs-var">ms_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177848"><span class="hs-identifier hs-var">mod_summary</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177830"><span class="hs-identifier hs-var">iface_path</span></a></span><span>
</span><span id="line-152"></span><span>             </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr SDoc ModIface
</span><a href="#local-6989586621681177828"><span class="hs-identifier hs-var">read_result</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-153"></span><span>                 </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681177825"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177825"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-154"></span><span>                     </span><span class="annot"><span class="annottext">SDoc -&gt; TcRnIf gbl lcl ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;FYI: cannot read old interface file:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177825"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>                     </span><span class="annot"><span class="annottext">SDoc -&gt; TcRnIf gbl lcl ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Old interface file was invalid:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177825"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>                     </span><span class="annot"><span class="annottext">Maybe ModIface -&gt; IOEnv (Env gbl lcl) (Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-157"></span><span>                 </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span id="local-6989586621681177820"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177820"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-158"></span><span>                     </span><span class="annot"><span class="annottext">SDoc -&gt; TcRnIf gbl lcl ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Read the interface file&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177830"><span class="hs-identifier hs-var">iface_path</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>                     </span><span class="annot"><span class="annottext">Maybe ModIface -&gt; IOEnv (Env gbl lcl) (Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe ModIface -&gt; IOEnv (Env gbl lcl) (Maybe ModIface))
-&gt; Maybe ModIface -&gt; IOEnv (Env gbl lcl) (Maybe ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Maybe ModIface
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177820"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span>        </span><span id="local-6989586621681177819"><span class="annot"><span class="annottext">src_changed :: Bool
</span><a href="#local-6989586621681177819"><span class="hs-identifier hs-var hs-var">src_changed</span></a></span></span><span>
</span><span id="line-162"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_ForceRecomp"><span class="hs-identifier hs-var">Opt_ForceRecomp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177849"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-163"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">SourceModified
</span><a href="GHC.Driver.Types.html#SourceModified"><span class="hs-identifier hs-var">SourceModified</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SourceModified
</span><a href="#local-6989586621681177847"><span class="hs-identifier hs-var">src_modified</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-164"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-165"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-166"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IOEnv (Env IfGblEnv ()) () -&gt; IOEnv (Env IfGblEnv ()) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681177819"><span class="hs-identifier hs-var">src_changed</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env IfGblEnv ()) () -&gt; IOEnv (Env IfGblEnv ()) ())
-&gt; IOEnv (Env IfGblEnv ()) () -&gt; IOEnv (Env IfGblEnv ()) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-167"></span><span>            </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Source file changed or recompilation check turned off&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681177819"><span class="hs-identifier hs-var">src_changed</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-170"></span><span>            </span><span class="hs-comment">-- If the source has changed and we're in interactive mode,</span><span>
</span><span id="line-171"></span><span>            </span><span class="hs-comment">-- avoid reading an interface; just return the one we might</span><span>
</span><span id="line-172"></span><span>            </span><span class="hs-comment">-- have been supplied with.</span><span>
</span><span id="line-173"></span><span>            </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscTarget -&gt; Bool
</span><a href="GHC.Driver.Session.html#isObjectTarget"><span class="hs-identifier hs-var">isObjectTarget</span></a></span><span> </span><span class="annot"><span class="annottext">(HscTarget -&gt; Bool) -&gt; HscTarget -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; HscTarget
</span><a href="GHC.Driver.Session.html#hscTarget"><span class="hs-identifier hs-var hs-var">hscTarget</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177845"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-174"></span><span>                </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#MustCompile"><span class="hs-identifier hs-var">MustCompile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177846"><span class="hs-identifier hs-var">maybe_iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span>            </span><span class="hs-comment">-- Try and read the old interface for the current module</span><span>
</span><span id="line-177"></span><span>            </span><span class="hs-comment">-- from the .hi file left from the last time we compiled it</span><span>
</span><span id="line-178"></span><span>            </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-179"></span><span>                </span><span id="local-6989586621681177811"><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177811"><span class="hs-identifier hs-var">maybe_iface'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv ()) (Maybe ModIface)
forall {gbl} {lcl}. IOEnv (Env gbl lcl) (Maybe ModIface)
</span><a href="#local-6989586621681177841"><span class="hs-identifier hs-var">getIface</span></a></span><span>
</span><span id="line-180"></span><span>                </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#MustCompile"><span class="hs-identifier hs-var">MustCompile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177811"><span class="hs-identifier hs-var">maybe_iface'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span>            </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-183"></span><span>                </span><span id="local-6989586621681177810"><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177810"><span class="hs-identifier hs-var">maybe_iface'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv ()) (Maybe ModIface)
forall {gbl} {lcl}. IOEnv (Env gbl lcl) (Maybe ModIface)
</span><a href="#local-6989586621681177841"><span class="hs-identifier hs-var">getIface</span></a></span><span>
</span><span id="line-184"></span><span>                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="#local-6989586621681177810"><span class="hs-identifier hs-var">maybe_iface'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-185"></span><span>                    </span><span class="hs-comment">-- We can't retrieve the iface</span><span>
</span><span id="line-186"></span><span>                    </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#MustCompile"><span class="hs-identifier hs-var">MustCompile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span>                    </span><span class="hs-comment">-- We have got the old iface; check its versions</span><span>
</span><span id="line-189"></span><span>                    </span><span class="hs-comment">-- even in the SourceUnmodifiedAndStable case we</span><span>
</span><span id="line-190"></span><span>                    </span><span class="hs-comment">-- should check versions because some packages</span><span>
</span><span id="line-191"></span><span>                    </span><span class="hs-comment">-- might have changed or gone away.</span><span>
</span><span id="line-192"></span><span>                    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177809"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177809"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HscEnv
-&gt; ModSummary
-&gt; ModIface
-&gt; IfG (RecompileRequired, Maybe ModIface)
</span><a href="GHC.Iface.Recomp.html#checkVersions"><span class="hs-identifier hs-var">checkVersions</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177849"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177848"><span class="hs-identifier hs-var">mod_summary</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177809"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="hs-comment">-- | Check if a module is still the same 'version'.</span><span>
</span><span id="line-195"></span><span class="hs-comment">--</span><span>
</span><span id="line-196"></span><span class="hs-comment">-- This function is called in the recompilation checker after we have</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- determined that the module M being checked hasn't had any changes</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- to its source file since we last compiled M. So at this point in general</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- two things may have changed that mean we should recompile M:</span><span>
</span><span id="line-200"></span><span class="hs-comment">--   * The interface export by a dependency of M has changed.</span><span>
</span><span id="line-201"></span><span class="hs-comment">--   * The compiler flags specified this time for M have changed</span><span>
</span><span id="line-202"></span><span class="hs-comment">--     in a manner that is significant for recompilation.</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- We return not just if we should recompile the object file but also</span><span>
</span><span id="line-204"></span><span class="hs-comment">-- if we should rebuild the interface file.</span><span>
</span><span id="line-205"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkVersions"><span class="hs-identifier hs-type">checkVersions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-206"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span>
</span><span id="line-207"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>       </span><span class="hs-comment">-- Old interface</span><span>
</span><span id="line-208"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span id="checkVersions"><span class="annot"><span class="annottext">checkVersions :: HscEnv
-&gt; ModSummary
-&gt; ModIface
-&gt; IfG (RecompileRequired, Maybe ModIface)
</span><a href="GHC.Iface.Recomp.html#checkVersions"><span class="hs-identifier hs-var hs-var">checkVersions</span></a></span></span><span> </span><span id="local-6989586621681177807"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177806"><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177806"><span class="hs-identifier hs-var">mod_summary</span></a></span></span><span> </span><span id="local-6989586621681177805"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span></span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Considering whether compilation is required for&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-211"></span><span>                        </span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span>       </span><span class="hs-comment">-- readIface will have verified that the UnitId matches,</span><span>
</span><span id="line-214"></span><span>       </span><span class="hs-comment">-- but we ALSO must make sure the instantiation matches up.  See</span><span>
</span><span id="line-215"></span><span>       </span><span class="hs-comment">-- test case bkpcabal04!</span><span>
</span><span id="line-216"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Unit
</span><a href="GHC.Driver.Session.html#homeUnit"><span class="hs-identifier hs-var">homeUnit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-217"></span><span>            </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-this-unit-id changed&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-218"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177798"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177798"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkFlagHash"><span class="hs-identifier hs-var">checkFlagHash</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-219"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177798"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177798"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-220"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177796"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177796"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkOptimHash"><span class="hs-identifier hs-var">checkOptimHash</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-221"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177796"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177796"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-222"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177794"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177794"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkHpcHash"><span class="hs-identifier hs-var">checkHpcHash</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-223"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177794"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177794"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-224"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177792"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177792"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkMergedSignatures"><span class="hs-identifier hs-var">checkMergedSignatures</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177806"><span class="hs-identifier hs-var">mod_summary</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-225"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177792"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177792"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-226"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177790"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177790"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkHsig"><span class="hs-identifier hs-var">checkHsig</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177806"><span class="hs-identifier hs-var">mod_summary</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-227"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177790"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177790"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-228"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177788"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177788"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkHie"><span class="hs-identifier hs-var">checkHie</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177806"><span class="hs-identifier hs-var">mod_summary</span></a></span><span>
</span><span id="line-229"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177788"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177788"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-230"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177786"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177786"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ModSummary -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkDependencies"><span class="hs-identifier hs-var">checkDependencies</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177806"><span class="hs-identifier hs-var">mod_summary</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-231"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177786"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177786"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Maybe ModIface
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-232"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177784"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177784"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkPlugins"><span class="hs-identifier hs-var">checkPlugins</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-233"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177784"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177784"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span>       </span><span class="hs-comment">-- Source code unchanged and no errors yet... carry on</span><span>
</span><span id="line-237"></span><span>       </span><span class="hs-comment">--</span><span>
</span><span id="line-238"></span><span>       </span><span class="hs-comment">-- First put the dependent-module info, read from the old</span><span>
</span><span id="line-239"></span><span>       </span><span class="hs-comment">-- interface, into the envt, so that when we look for</span><span>
</span><span id="line-240"></span><span>       </span><span class="hs-comment">-- interfaces we look for the right one (.hi or .hi-boot)</span><span>
</span><span id="line-241"></span><span>       </span><span class="hs-comment">--</span><span>
</span><span id="line-242"></span><span>       </span><span class="hs-comment">-- It's just temporary because either the usage check will succeed</span><span>
</span><span id="line-243"></span><span>       </span><span class="hs-comment">-- (in which case we are done with this module) or it'll fail (in which</span><span>
</span><span id="line-244"></span><span>       </span><span class="hs-comment">-- case we'll compile the module from scratch anyhow).</span><span>
</span><span id="line-245"></span><span>       </span><span class="hs-comment">--</span><span>
</span><span id="line-246"></span><span>       </span><span class="hs-comment">-- We do this regardless of compilation mode, although in --make mode</span><span>
</span><span id="line-247"></span><span>       </span><span class="hs-comment">-- all the dependent modules should be in the HPT already, so it's</span><span>
</span><span id="line-248"></span><span>       </span><span class="hs-comment">-- quite redundant</span><span>
</span><span id="line-249"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(ExternalPackageState -&gt; ExternalPackageState)
-&gt; IOEnv (Env IfGblEnv ()) ()
forall gbl lcl.
(ExternalPackageState -&gt; ExternalPackageState) -&gt; TcRnIf gbl lcl ()
</span><a href="GHC.Tc.Utils.Monad.html#updateEps_"><span class="hs-identifier hs-var">updateEps_</span></a></span><span> </span><span class="annot"><span class="annottext">((ExternalPackageState -&gt; ExternalPackageState)
 -&gt; IOEnv (Env IfGblEnv ()) ())
-&gt; (ExternalPackageState -&gt; ExternalPackageState)
-&gt; IOEnv (Env IfGblEnv ()) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681177781"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177781"><span class="hs-identifier hs-var">eps</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177781"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">eps_is_boot :: ModuleNameEnv ModuleNameWithIsBoot
</span><a href="GHC.Driver.Types.html#eps_is_boot"><span class="hs-identifier hs-var">eps_is_boot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleNameEnv ModuleNameWithIsBoot
</span><a href="#local-6989586621681177779"><span class="hs-identifier hs-var">mod_deps</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-250"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681177778"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177778"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfG RecompileRequired] -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-var">checkList</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unit -&gt; Usage -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkModUsage"><span class="hs-identifier hs-var">checkModUsage</span></a></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177775"><span class="hs-identifier hs-var">this_pkg</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681177774"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681177774"><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681177774"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; [Usage]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [Usage]
</span><a href="GHC.Driver.Types.html#mi_usages"><span class="hs-identifier hs-var hs-var">mi_usages</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-251"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, Maybe ModIface)
-&gt; IfG (RecompileRequired, Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177778"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Maybe ModIface
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>    </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-253"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-254"></span><span>    </span><span id="local-6989586621681177775"><span class="annot"><span class="annottext">this_pkg :: Unit
</span><a href="#local-6989586621681177775"><span class="hs-identifier hs-var hs-var">this_pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Unit
</span><a href="GHC.Driver.Session.html#homeUnit"><span class="hs-identifier hs-var">homeUnit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177807"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-255"></span><span>    </span><span class="hs-comment">-- This is a bit of a hack really</span><span>
</span><span id="line-256"></span><span>    </span><span class="annot"><a href="#local-6989586621681177779"><span class="hs-identifier hs-type">mod_deps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Env.html#ModuleNameEnv"><span class="hs-identifier hs-type">ModuleNameEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#ModuleNameWithIsBoot"><span class="hs-identifier hs-type">ModuleNameWithIsBoot</span></a></span><span>
</span><span id="line-257"></span><span>    </span><span id="local-6989586621681177779"><span class="annot"><span class="annottext">mod_deps :: ModuleNameEnv ModuleNameWithIsBoot
</span><a href="#local-6989586621681177779"><span class="hs-identifier hs-var hs-var">mod_deps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleNameWithIsBoot] -&gt; ModuleNameEnv ModuleNameWithIsBoot
</span><a href="GHC.Tc.Types.html#mkModDeps"><span class="hs-identifier hs-var">mkModDeps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dependencies -&gt; [ModuleNameWithIsBoot]
</span><a href="GHC.Driver.Types.html#dep_mods"><span class="hs-identifier hs-var hs-var">dep_mods</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177805"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-comment">-- | Check if any plugins are requesting recompilation</span><span>
</span><span id="line-260"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkPlugins"><span class="hs-identifier hs-type">checkPlugins</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-261"></span><span id="checkPlugins"><span class="annot"><span class="annottext">checkPlugins :: HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkPlugins"><span class="hs-identifier hs-var hs-var">checkPlugins</span></a></span></span><span> </span><span id="local-6989586621681177769"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177769"><span class="hs-identifier hs-var">hsc</span></a></span></span><span> </span><span id="local-6989586621681177768"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177768"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO RecompileRequired -&gt; IfG RecompileRequired)
-&gt; IO RecompileRequired -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-262"></span><span>  </span><span id="local-6989586621681177766"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177766"><span class="hs-identifier hs-var">new_fingerprint</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.html#fingerprintPlugins"><span class="hs-identifier hs-var">fingerprintPlugins</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177769"><span class="hs-identifier hs-var">hsc</span></a></span><span>
</span><span id="line-263"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177764"><span class="annot"><span class="annottext">old_fingerprint :: Fingerprint
</span><a href="#local-6989586621681177764"><span class="hs-identifier hs-var hs-var">old_fingerprint</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_plugin_hash"><span class="hs-identifier hs-var hs-var">mi_plugin_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177768"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span>  </span><span id="local-6989586621681177761"><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621681177761"><span class="hs-identifier hs-var">pr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[PluginRecompile] -&gt; PluginRecompile
forall a. Monoid a =&gt; [a] -&gt; a
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var">mconcat</span></a></span><span> </span><span class="annot"><span class="annottext">([PluginRecompile] -&gt; PluginRecompile)
-&gt; IO [PluginRecompile] -&gt; IO PluginRecompile
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(PluginWithArgs -&gt; IO PluginRecompile)
-&gt; [PluginWithArgs] -&gt; IO [PluginRecompile]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">PluginWithArgs -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#pluginRecompile%27"><span class="hs-identifier hs-var">pluginRecompile'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; [PluginWithArgs]
</span><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier hs-var">plugins</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177769"><span class="hs-identifier hs-var">hsc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-265"></span><span>  </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IO RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(RecompileRequired -&gt; IO RecompileRequired)
-&gt; RecompileRequired -&gt; IO RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-266"></span><span>    </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; PluginRecompile -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#pluginRecompileToRecompileRequired"><span class="hs-identifier hs-var">pluginRecompileToRecompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177764"><span class="hs-identifier hs-var">old_fingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177766"><span class="hs-identifier hs-var">new_fingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621681177761"><span class="hs-identifier hs-var">pr</span></a></span><span>
</span><span id="line-267"></span><span>
</span><span id="line-268"></span><span class="annot"><a href="GHC.Iface.Recomp.html#fingerprintPlugins"><span class="hs-identifier hs-type">fingerprintPlugins</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span>
</span><span id="line-269"></span><span id="fingerprintPlugins"><span class="annot"><span class="annottext">fingerprintPlugins :: HscEnv -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.html#fingerprintPlugins"><span class="hs-identifier hs-var hs-var">fingerprintPlugins</span></a></span></span><span> </span><span id="local-6989586621681177757"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177757"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-270"></span><span>  </span><span class="annot"><span class="annottext">[PluginWithArgs] -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.html#fingerprintPlugins%27"><span class="hs-identifier hs-var">fingerprintPlugins'</span></a></span><span> </span><span class="annot"><span class="annottext">([PluginWithArgs] -&gt; IO Fingerprint)
-&gt; [PluginWithArgs] -&gt; IO Fingerprint
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [PluginWithArgs]
</span><a href="GHC.Driver.Plugins.html#plugins"><span class="hs-identifier hs-var">plugins</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177757"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span class="annot"><a href="GHC.Iface.Recomp.html#fingerprintPlugins%27"><span class="hs-identifier hs-type">fingerprintPlugins'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginWithArgs"><span class="hs-identifier hs-type">PluginWithArgs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span>
</span><span id="line-273"></span><span id="fingerprintPlugins%27"><span class="annot"><span class="annottext">fingerprintPlugins' :: [PluginWithArgs] -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.html#fingerprintPlugins%27"><span class="hs-identifier hs-var hs-var">fingerprintPlugins'</span></a></span></span><span> </span><span id="local-6989586621681177755"><span class="annot"><span class="annottext">[PluginWithArgs]
</span><a href="#local-6989586621681177755"><span class="hs-identifier hs-var">plugins</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-274"></span><span>  </span><span id="local-6989586621681177754"><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621681177754"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[PluginRecompile] -&gt; PluginRecompile
forall a. Monoid a =&gt; [a] -&gt; a
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var">mconcat</span></a></span><span> </span><span class="annot"><span class="annottext">([PluginRecompile] -&gt; PluginRecompile)
-&gt; IO [PluginRecompile] -&gt; IO PluginRecompile
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(PluginWithArgs -&gt; IO PluginRecompile)
-&gt; [PluginWithArgs] -&gt; IO [PluginRecompile]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">PluginWithArgs -&gt; IO PluginRecompile
</span><a href="GHC.Driver.Plugins.html#pluginRecompile%27"><span class="hs-identifier hs-var">pluginRecompile'</span></a></span><span> </span><span class="annot"><span class="annottext">[PluginWithArgs]
</span><a href="#local-6989586621681177755"><span class="hs-identifier hs-var">plugins</span></a></span><span>
</span><span id="line-275"></span><span>  </span><span class="annot"><span class="annottext">Fingerprint -&gt; IO Fingerprint
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Fingerprint -&gt; IO Fingerprint) -&gt; Fingerprint -&gt; IO Fingerprint
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621681177754"><span class="hs-identifier hs-var">res</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-276"></span><span>      </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintString"><span class="hs-identifier hs-var">fingerprintString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NoForceRecompile&quot;</span></span><span>
</span><span id="line-277"></span><span>      </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintString"><span class="hs-identifier hs-var">fingerprintString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ForceRecompile&quot;</span></span><span>
</span><span id="line-278"></span><span>      </span><span class="hs-comment">-- is the chance of collision worth worrying about?</span><span>
</span><span id="line-279"></span><span>      </span><span class="hs-comment">-- An alternative is to fingerprintFingerprints [fingerprintString</span><span>
</span><span id="line-280"></span><span>      </span><span class="hs-comment">-- &quot;maybeRecompile&quot;, fp]</span><span>
</span><span id="line-281"></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-type">MaybeRecompile</span></a></span><span> </span><span id="local-6989586621681177749"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177749"><span class="hs-identifier hs-var">fp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177749"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="annot"><a href="GHC.Iface.Recomp.html#pluginRecompileToRecompileRequired"><span class="hs-identifier hs-type">pluginRecompileToRecompileRequired</span></a></span><span>
</span><span id="line-285"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html#PluginRecompile"><span class="hs-identifier hs-type">PluginRecompile</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-286"></span><span id="pluginRecompileToRecompileRequired"><span class="annot"><span class="annottext">pluginRecompileToRecompileRequired :: Fingerprint -&gt; Fingerprint -&gt; PluginRecompile -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#pluginRecompileToRecompileRequired"><span class="hs-identifier hs-var hs-var">pluginRecompileToRecompileRequired</span></a></span></span><span> </span><span id="local-6989586621681177748"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177748"><span class="hs-identifier hs-var">old_fp</span></a></span></span><span> </span><span id="local-6989586621681177747"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177747"><span class="hs-identifier hs-var">new_fp</span></a></span></span><span> </span><span id="local-6989586621681177746"><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621681177746"><span class="hs-identifier hs-var">pr</span></a></span></span><span>
</span><span id="line-287"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177748"><span class="hs-identifier hs-var">old_fp</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177747"><span class="hs-identifier hs-var">new_fp</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-288"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621681177746"><span class="hs-identifier hs-var">pr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-289"></span><span>      </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#NoForceRecompile"><span class="hs-identifier hs-var">NoForceRecompile</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span>      </span><span class="hs-comment">-- we already checked the fingerprint above so a mismatch is not possible</span><span>
</span><span id="line-292"></span><span>      </span><span class="hs-comment">-- here, remember that: `fingerprint (MaybeRecomp x) == x`.</span><span>
</span><span id="line-293"></span><span>      </span><span class="annot"><a href="GHC.Driver.Plugins.html#MaybeRecompile"><span class="hs-identifier hs-type">MaybeRecompile</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span>      </span><span class="hs-comment">-- when we have an impure plugin in the stack we have to unconditionally</span><span>
</span><span id="line-296"></span><span>      </span><span class="hs-comment">-- recompile since it might integrate all sorts of crazy IO results into</span><span>
</span><span id="line-297"></span><span>      </span><span class="hs-comment">-- its compilation output.</span><span>
</span><span id="line-298"></span><span>      </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Impure plugin forced recompilation&quot;</span></span><span>
</span><span id="line-299"></span><span>
</span><span id="line-300"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177748"><span class="hs-identifier hs-var">old_fp</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; [Fingerprint] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[Fingerprint]
</span><a href="#local-6989586621681177744"><span class="hs-identifier hs-var">magic_fingerprints</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span>
</span><span id="line-301"></span><span>    </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177747"><span class="hs-identifier hs-var">new_fp</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; [Fingerprint] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[Fingerprint]
</span><a href="#local-6989586621681177744"><span class="hs-identifier hs-var">magic_fingerprints</span></a></span><span>
</span><span id="line-302"></span><span>    </span><span class="hs-comment">-- The fingerprints do not match either the old or new one is a magic</span><span>
</span><span id="line-303"></span><span>    </span><span class="hs-comment">-- fingerprint. This happens when non-pure plugins are added for the first</span><span>
</span><span id="line-304"></span><span>    </span><span class="hs-comment">-- time or when we go from one recompilation strategy to another: (force -&gt;</span><span>
</span><span id="line-305"></span><span>    </span><span class="hs-comment">-- no-force, maybe-recomp -&gt; no-force, no-force -&gt; maybe-recomp etc.)</span><span>
</span><span id="line-306"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-307"></span><span>    </span><span class="hs-comment">-- For example when we go from ForceRecomp to NoForceRecomp</span><span>
</span><span id="line-308"></span><span>    </span><span class="hs-comment">-- recompilation is triggered since the old impure plugins could have</span><span>
</span><span id="line-309"></span><span>    </span><span class="hs-comment">-- changed the build output which is now back to normal.</span><span>
</span><span id="line-310"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Plugins changed&quot;</span></span><span>
</span><span id="line-311"></span><span>
</span><span id="line-312"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-313"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177742"><span class="annot"><span class="annottext">reason :: String
</span><a href="#local-6989586621681177742"><span class="hs-identifier hs-var hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Plugin fingerprint changed&quot;</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-314"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="#local-6989586621681177746"><span class="hs-identifier hs-var">pr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-315"></span><span>      </span><span class="hs-comment">-- even though a plugin is forcing recompilation the fingerprint changed</span><span>
</span><span id="line-316"></span><span>      </span><span class="hs-comment">-- which would cause recompilation anyways so we report the fingerprint</span><span>
</span><span id="line-317"></span><span>      </span><span class="hs-comment">-- change instead.</span><span>
</span><span id="line-318"></span><span>      </span><span class="annot"><span class="annottext">PluginRecompile
</span><a href="GHC.Driver.Plugins.html#ForceRecompile"><span class="hs-identifier hs-var">ForceRecompile</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177742"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span>      </span><span class="annot"><span class="annottext">PluginRecompile
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177742"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-321"></span><span>
</span><span id="line-322"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-323"></span><span>   </span><span id="local-6989586621681177744"><span class="annot"><span class="annottext">magic_fingerprints :: [Fingerprint]
</span><a href="#local-6989586621681177744"><span class="hs-identifier hs-var hs-var">magic_fingerprints</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-324"></span><span>       </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintString"><span class="hs-identifier hs-var">fingerprintString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NoForceRecompile&quot;</span></span><span>
</span><span id="line-325"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintString"><span class="hs-identifier hs-var">fingerprintString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ForceRecompile&quot;</span></span><span>
</span><span id="line-326"></span><span>       </span><span class="hs-special">]</span><span>
</span><span id="line-327"></span><span>
</span><span id="line-328"></span><span>
</span><span id="line-329"></span><span class="hs-comment">-- | Check if an hsig file needs recompilation because its</span><span>
</span><span id="line-330"></span><span class="hs-comment">-- implementing module has changed.</span><span>
</span><span id="line-331"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkHsig"><span class="hs-identifier hs-type">checkHsig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-332"></span><span id="checkHsig"><span class="annot"><span class="annottext">checkHsig :: ModSummary -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkHsig"><span class="hs-identifier hs-var hs-var">checkHsig</span></a></span></span><span> </span><span id="local-6989586621681177741"><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177741"><span class="hs-identifier hs-var">mod_summary</span></a></span></span><span> </span><span id="local-6989586621681177740"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177740"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-333"></span><span>    </span><span id="local-6989586621681177739"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177739"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv ()) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-334"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177737"><span class="annot"><span class="annottext">outer_mod :: Module
</span><a href="#local-6989586621681177737"><span class="hs-identifier hs-var hs-var">outer_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; Module
</span><a href="GHC.Driver.Types.html#ms_mod"><span class="hs-identifier hs-var hs-var">ms_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177741"><span class="hs-identifier hs-var">mod_summary</span></a></span><span>
</span><span id="line-335"></span><span>        </span><span id="local-6989586621681177736"><span class="annot"><span class="annottext">inner_mod :: Module
</span><a href="#local-6989586621681177736"><span class="hs-identifier hs-var hs-var">inner_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ModuleName -&gt; Module
</span><a href="GHC.Driver.Session.html#canonicalizeHomeModule"><span class="hs-identifier hs-var">canonicalizeHomeModule</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177739"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177737"><span class="hs-identifier hs-var">outer_mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span>    </span><span class="hs-identifier">MASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">moduleUnit</span><span> </span><span class="hs-identifier">outer_mod</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">homeUnit</span><span> </span><span class="hs-identifier">dflags</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-337"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177736"><span class="hs-identifier hs-var">inner_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_semantic_module"><span class="hs-identifier hs-var">mi_semantic_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177740"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-338"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;implementing module unchanged&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-339"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;implementing module changed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span class="hs-comment">-- | Check if @.hie@ file is out of date or missing.</span><span>
</span><span id="line-342"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkHie"><span class="hs-identifier hs-type">checkHie</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-343"></span><span id="checkHie"><span class="annot"><span class="annottext">checkHie :: ModSummary -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkHie"><span class="hs-identifier hs-var hs-var">checkHie</span></a></span></span><span> </span><span id="local-6989586621681177728"><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177728"><span class="hs-identifier hs-var">mod_summary</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-344"></span><span>    </span><span id="local-6989586621681177727"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177727"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv ()) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-345"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177726"><span class="annot"><span class="annottext">hie_date_opt :: Maybe UTCTime
</span><a href="#local-6989586621681177726"><span class="hs-identifier hs-var hs-var">hie_date_opt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; Maybe UTCTime
</span><a href="GHC.Driver.Types.html#ms_hie_date"><span class="hs-identifier hs-var hs-var">ms_hie_date</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177728"><span class="hs-identifier hs-var">mod_summary</span></a></span><span>
</span><span id="line-346"></span><span>        </span><span id="local-6989586621681177724"><span class="annot"><span class="annottext">hs_date :: UTCTime
</span><a href="#local-6989586621681177724"><span class="hs-identifier hs-var hs-var">hs_date</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; UTCTime
</span><a href="GHC.Driver.Types.html#ms_hs_date"><span class="hs-identifier hs-var hs-var">ms_hs_date</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177728"><span class="hs-identifier hs-var">mod_summary</span></a></span><span>
</span><span id="line-347"></span><span>    </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(RecompileRequired -&gt; IfG RecompileRequired)
-&gt; RecompileRequired -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_WriteHie"><span class="hs-identifier hs-var">Opt_WriteHie</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177727"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-348"></span><span>               </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-349"></span><span>               </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe UTCTime
</span><a href="#local-6989586621681177726"><span class="hs-identifier hs-var">hie_date_opt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-350"></span><span>                           </span><span class="annot"><span class="annottext">Maybe UTCTime
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HIE file is missing&quot;</span></span><span>
</span><span id="line-351"></span><span>                           </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177721"><span class="annot"><span class="annottext">UTCTime
</span><a href="#local-6989586621681177721"><span class="hs-identifier hs-var">hie_date</span></a></span></span><span>
</span><span id="line-352"></span><span>                               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UTCTime
</span><a href="#local-6989586621681177721"><span class="hs-identifier hs-var">hie_date</span></a></span><span> </span><span class="annot"><span class="annottext">UTCTime -&gt; UTCTime -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">UTCTime
</span><a href="#local-6989586621681177724"><span class="hs-identifier hs-var">hs_date</span></a></span><span>
</span><span id="line-353"></span><span>                               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HIE file is out of date&quot;</span></span><span>
</span><span id="line-354"></span><span>                               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-355"></span><span>                               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-356"></span><span>
</span><span id="line-357"></span><span class="hs-comment">-- | Check the flags haven't changed</span><span>
</span><span id="line-358"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkFlagHash"><span class="hs-identifier hs-type">checkFlagHash</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-359"></span><span id="checkFlagHash"><span class="annot"><span class="annottext">checkFlagHash :: HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkFlagHash"><span class="hs-identifier hs-var hs-var">checkFlagHash</span></a></span></span><span> </span><span id="local-6989586621681177719"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177719"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177718"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177718"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-360"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177717"><span class="annot"><span class="annottext">old_hash :: Fingerprint
</span><a href="#local-6989586621681177717"><span class="hs-identifier hs-var hs-var">old_hash</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_flag_hash"><span class="hs-identifier hs-var hs-var">mi_flag_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177718"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-361"></span><span>    </span><span id="local-6989586621681177715"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177715"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint)
-&gt; IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module -&gt; (BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Flags.html#fingerprintDynFlags"><span class="hs-identifier hs-var">fingerprintDynFlags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177719"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span>                                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177718"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span>                                             </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-364"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177717"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177715"><span class="hs-identifier hs-var">new_hash</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-365"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Module flags unchanged&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-366"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-var">out_of_date_hash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;flags changed&quot;</span></span><span>
</span><span id="line-367"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  Module flags have changed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-368"></span><span>                     </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177717"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177715"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="hs-comment">-- | Check the optimisation flags haven't changed</span><span>
</span><span id="line-371"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkOptimHash"><span class="hs-identifier hs-type">checkOptimHash</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-372"></span><span id="checkOptimHash"><span class="annot"><span class="annottext">checkOptimHash :: HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkOptimHash"><span class="hs-identifier hs-var hs-var">checkOptimHash</span></a></span></span><span> </span><span id="local-6989586621681177711"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177711"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177710"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177710"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-373"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177709"><span class="annot"><span class="annottext">old_hash :: Fingerprint
</span><a href="#local-6989586621681177709"><span class="hs-identifier hs-var hs-var">old_hash</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_opt_hash"><span class="hs-identifier hs-var hs-var">mi_opt_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177710"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-374"></span><span>    </span><span id="local-6989586621681177707"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177707"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint)
-&gt; IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Flags.html#fingerprintOptFlags"><span class="hs-identifier hs-var">fingerprintOptFlags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177711"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-375"></span><span>                                               </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-376"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177709"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177707"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-377"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Optimisation flags unchanged&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-378"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_IgnoreOptimChanges"><span class="hs-identifier hs-var">Opt_IgnoreOptimChanges</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177711"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-379"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Optimisation flags changed; ignoring&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-380"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-381"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-var">out_of_date_hash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Optimisation flags changed&quot;</span></span><span>
</span><span id="line-382"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  Optimisation flags have changed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-383"></span><span>                     </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177709"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177707"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="hs-comment">-- | Check the HPC flags haven't changed</span><span>
</span><span id="line-386"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkHpcHash"><span class="hs-identifier hs-type">checkHpcHash</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-387"></span><span id="checkHpcHash"><span class="annot"><span class="annottext">checkHpcHash :: HscEnv -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkHpcHash"><span class="hs-identifier hs-var hs-var">checkHpcHash</span></a></span></span><span> </span><span id="local-6989586621681177704"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177704"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177703"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177703"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-388"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177702"><span class="annot"><span class="annottext">old_hash :: Fingerprint
</span><a href="#local-6989586621681177702"><span class="hs-identifier hs-var hs-var">old_hash</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_hpc_hash"><span class="hs-identifier hs-var hs-var">mi_hpc_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177703"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-389"></span><span>    </span><span id="local-6989586621681177700"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177700"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint)
-&gt; IO Fingerprint -&gt; IOEnv (Env IfGblEnv ()) Fingerprint
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Flags.html#fingerprintHpcFlags"><span class="hs-identifier hs-var">fingerprintHpcFlags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177704"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-390"></span><span>                                               </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-391"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177702"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177700"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-392"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HPC flags unchanged&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_IgnoreHpcChanges"><span class="hs-identifier hs-var">Opt_IgnoreHpcChanges</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177704"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-394"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HPC flags changed; ignoring&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-395"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-396"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-var">out_of_date_hash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HPC flags changed&quot;</span></span><span>
</span><span id="line-397"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  HPC flags have changed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-398"></span><span>                     </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177702"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177700"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-399"></span><span>
</span><span id="line-400"></span><span class="hs-comment">-- Check that the set of signatures we are merging in match.</span><span>
</span><span id="line-401"></span><span class="hs-comment">-- If the -unit-id flags change, this can change too.</span><span>
</span><span id="line-402"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkMergedSignatures"><span class="hs-identifier hs-type">checkMergedSignatures</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-403"></span><span id="checkMergedSignatures"><span class="annot"><span class="annottext">checkMergedSignatures :: ModSummary -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkMergedSignatures"><span class="hs-identifier hs-var hs-var">checkMergedSignatures</span></a></span></span><span> </span><span id="local-6989586621681177697"><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177697"><span class="hs-identifier hs-var">mod_summary</span></a></span></span><span> </span><span id="local-6989586621681177696"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177696"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-404"></span><span>    </span><span id="local-6989586621681177695"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177695"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv ()) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-405"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177690"><span class="annot"><span class="annottext">old_merged :: [Module]
</span><a href="#local-6989586621681177690"><span class="hs-identifier hs-var hs-var">old_merged</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Module] -&gt; [Module]
forall a. Ord a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sort"><span class="hs-identifier hs-var">sort</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177689"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#UsageMergedRequirement"><span class="hs-identifier hs-type">UsageMergedRequirement</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">usg_mod :: Usage -&gt; Module
</span><a href="GHC.Driver.Types.html#usg_mod"><span class="hs-identifier hs-var">usg_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177689"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177689"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; [Usage]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [Usage]
</span><a href="GHC.Driver.Types.html#mi_usages"><span class="hs-identifier hs-var hs-var">mi_usages</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177696"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-406"></span><span>        </span><span id="local-6989586621681177682"><span class="annot"><span class="annottext">new_merged :: [Module]
</span><a href="#local-6989586621681177682"><span class="hs-identifier hs-var hs-var">new_merged</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ModuleName
-&gt; Map ModuleName [InstantiatedModule]
-&gt; Maybe [InstantiatedModule]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModSummary -&gt; ModuleName
</span><a href="GHC.Driver.Types.html#ms_mod_name"><span class="hs-identifier hs-var">ms_mod_name</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177697"><span class="hs-identifier hs-var">mod_summary</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span>                                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnitState -&gt; Map ModuleName [InstantiatedModule]
</span><a href="GHC.Unit.State.html#requirementContext"><span class="hs-identifier hs-var hs-var">requirementContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; UnitState
</span><a href="GHC.Driver.Session.html#unitState"><span class="hs-identifier hs-var hs-var">unitState</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177695"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-408"></span><span>                        </span><span class="annot"><span class="annottext">Maybe [InstantiatedModule]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-409"></span><span>                        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177677"><span class="annot"><span class="annottext">[InstantiatedModule]
</span><a href="#local-6989586621681177677"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Module] -&gt; [Module]
forall a. Ord a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sort"><span class="hs-identifier hs-var">sort</span></a></span><span> </span><span class="annot"><span class="annottext">([Module] -&gt; [Module]) -&gt; [Module] -&gt; [Module]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(InstantiatedModule -&gt; Module) -&gt; [InstantiatedModule] -&gt; [Module]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnitState -&gt; InstantiatedModule -&gt; Module
</span><a href="GHC.Unit.State.html#instModuleToModule"><span class="hs-identifier hs-var">instModuleToModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; UnitState
</span><a href="GHC.Driver.Session.html#unitState"><span class="hs-identifier hs-var hs-var">unitState</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177695"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[InstantiatedModule]
</span><a href="#local-6989586621681177677"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-410"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681177690"><span class="hs-identifier hs-var">old_merged</span></a></span><span> </span><span class="annot"><span class="annottext">[Module] -&gt; [Module] -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681177682"><span class="hs-identifier hs-var">new_merged</span></a></span><span>
</span><span id="line-411"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;signatures to merge in unchanged&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[Module] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681177682"><span class="hs-identifier hs-var">new_merged</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-412"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;signatures to merge in changed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-413"></span><span>
</span><span id="line-414"></span><span class="hs-comment">-- If the direct imports of this module are resolved to targets that</span><span>
</span><span id="line-415"></span><span class="hs-comment">-- are not among the dependencies of the previous interface file,</span><span>
</span><span id="line-416"></span><span class="hs-comment">-- then we definitely need to recompile.  This catches cases like</span><span>
</span><span id="line-417"></span><span class="hs-comment">--   - an exposed package has been upgraded</span><span>
</span><span id="line-418"></span><span class="hs-comment">--   - we are compiling with different package flags</span><span>
</span><span id="line-419"></span><span class="hs-comment">--   - a home module that was shadowing a package module has been removed</span><span>
</span><span id="line-420"></span><span class="hs-comment">--   - a new home module has been added that shadows a package module</span><span>
</span><span id="line-421"></span><span class="hs-comment">-- See bug #1372.</span><span>
</span><span id="line-422"></span><span class="hs-comment">--</span><span>
</span><span id="line-423"></span><span class="hs-comment">-- In addition, we also check if the union of dependencies of the imported</span><span>
</span><span id="line-424"></span><span class="hs-comment">-- modules has any difference to the previous set of dependencies. We would need</span><span>
</span><span id="line-425"></span><span class="hs-comment">-- to recompile in that case also since the `mi_deps` field of ModIface needs</span><span>
</span><span id="line-426"></span><span class="hs-comment">-- to be updated to match that information. This is one of the invariants</span><span>
</span><span id="line-427"></span><span class="hs-comment">-- of interface files (see https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance#interface-file-invariants).</span><span>
</span><span id="line-428"></span><span class="hs-comment">-- See bug #16511.</span><span>
</span><span id="line-429"></span><span class="hs-comment">--</span><span>
</span><span id="line-430"></span><span class="hs-comment">-- Returns (RecompBecause &lt;textual reason&gt;) if recompilation is required.</span><span>
</span><span id="line-431"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkDependencies"><span class="hs-identifier hs-type">checkDependencies</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-432"></span><span id="checkDependencies"><span class="annot"><span class="annottext">checkDependencies :: HscEnv -&gt; ModSummary -&gt; ModIface -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkDependencies"><span class="hs-identifier hs-var hs-var">checkDependencies</span></a></span></span><span> </span><span id="local-6989586621681177675"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177675"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177674"><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177674"><span class="hs-identifier hs-var">summary</span></a></span></span><span> </span><span id="local-6989586621681177673"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177673"><span class="hs-identifier hs-var">iface</span></a></span></span><span>
</span><span id="line-433"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-434"></span><span>   </span><span class="annot"><span class="annottext">[IfG RecompileRequired] -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-var">checkList</span></a></span><span> </span><span class="annot"><span class="annottext">([IfG RecompileRequired] -&gt; IfG RecompileRequired)
-&gt; [IfG RecompileRequired] -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-435"></span><span>     </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[IfG RecompileRequired] -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-var">checkList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Maybe FastString, GenLocated SrcSpan ModuleName)
 -&gt; IfG RecompileRequired)
-&gt; [(Maybe FastString, GenLocated SrcSpan ModuleName)]
-&gt; [IfG RecompileRequired]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe FastString, GenLocated SrcSpan ModuleName)
-&gt; IfG RecompileRequired
forall {l} {m} {n}.
(Maybe FastString, GenLocated l ModuleName)
-&gt; IOEnv (Env m n) RecompileRequired
</span><a href="#local-6989586621681177672"><span class="hs-identifier hs-var">dep_missing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModSummary -&gt; [(Maybe FastString, GenLocated SrcSpan ModuleName)]
</span><a href="GHC.Driver.Types.html#ms_imps"><span class="hs-identifier hs-var">ms_imps</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177674"><span class="hs-identifier hs-var">summary</span></a></span><span> </span><span class="annot"><span class="annottext">[(Maybe FastString, GenLocated SrcSpan ModuleName)]
-&gt; [(Maybe FastString, GenLocated SrcSpan ModuleName)]
-&gt; [(Maybe FastString, GenLocated SrcSpan ModuleName)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary -&gt; [(Maybe FastString, GenLocated SrcSpan ModuleName)]
</span><a href="GHC.Driver.Types.html#ms_srcimps"><span class="hs-identifier hs-var hs-var">ms_srcimps</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177674"><span class="hs-identifier hs-var">summary</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-436"></span><span>     </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-437"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621681177669"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177669"><span class="hs-identifier hs-var">recomp</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177668"><span class="annot"><span class="annottext">[[ModuleName]]
</span><a href="#local-6989586621681177668"><span class="hs-identifier hs-var">mnames_seen</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])]
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [[ModuleName]])
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
[m (RecompileRequired, a)] -&gt; m (RecompileRequired, [a])
</span><a href="#local-6989586621681177667"><span class="hs-identifier hs-var">runUntilRecompRequired</span></a></span><span> </span><span class="annot"><span class="annottext">([IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])]
 -&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [[ModuleName]]))
-&gt; [IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])]
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [[ModuleName]])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan ModuleName
 -&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName]))
-&gt; [GenLocated SrcSpan ModuleName]
-&gt; [IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span>
</span><span id="line-438"></span><span>           </span><span class="annot"><span class="annottext">GenLocated SrcSpan ModuleName
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
forall {l}.
GenLocated l ModuleName
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
</span><a href="#local-6989586621681177666"><span class="hs-identifier hs-var">checkForNewHomeDependency</span></a></span><span>
</span><span id="line-439"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModSummary -&gt; [GenLocated SrcSpan ModuleName]
</span><a href="GHC.Driver.Types.html#ms_home_imps"><span class="hs-identifier hs-var">ms_home_imps</span></a></span><span> </span><span class="annot"><span class="annottext">ModSummary
</span><a href="#local-6989586621681177674"><span class="hs-identifier hs-var">summary</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-440"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177669"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-441"></span><span>           </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-442"></span><span>             </span><span class="hs-keyword">let</span><span>
</span><span id="line-443"></span><span>               </span><span id="local-6989586621681177661"><span class="annot"><span class="annottext">seen_home_deps :: Set ModuleName
</span><a href="#local-6989586621681177661"><span class="hs-identifier hs-var hs-var">seen_home_deps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Set ModuleName] -&gt; Set ModuleName
forall (f :: * -&gt; *) a. (Foldable f, Ord a) =&gt; f (Set a) -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#unions"><span class="hs-identifier hs-var">Set.unions</span></a></span><span> </span><span class="annot"><span class="annottext">([Set ModuleName] -&gt; Set ModuleName)
-&gt; [Set ModuleName] -&gt; Set ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleName] -&gt; Set ModuleName)
-&gt; [[ModuleName]] -&gt; [Set ModuleName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Set ModuleName
forall a. Ord a =&gt; [a] -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#fromList"><span class="hs-identifier hs-var">Set.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">[[ModuleName]]
</span><a href="#local-6989586621681177668"><span class="hs-identifier hs-var">mnames_seen</span></a></span><span>
</span><span id="line-444"></span><span>             </span><span class="annot"><span class="annottext">Set ModuleName -&gt; IfG RecompileRequired
forall {m} {n}. Set ModuleName -&gt; IOEnv (Env m n) RecompileRequired
</span><a href="#local-6989586621681177658"><span class="hs-identifier hs-var">checkIfAllOldHomeDependenciesAreSeen</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621681177661"><span class="hs-identifier hs-var">seen_home_deps</span></a></span><span>
</span><span id="line-445"></span><span>           </span><span class="annot"><span class="annottext">RecompileRequired
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177669"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-446"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-447"></span><span>   </span><span id="local-6989586621681177657"><span class="annot"><span class="annottext">prev_dep_mods :: [ModuleNameWithIsBoot]
</span><a href="#local-6989586621681177657"><span class="hs-identifier hs-var hs-var">prev_dep_mods</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Dependencies -&gt; [ModuleNameWithIsBoot]
</span><a href="GHC.Driver.Types.html#dep_mods"><span class="hs-identifier hs-var hs-var">dep_mods</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177673"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-448"></span><span>   </span><span id="local-6989586621681177656"><span class="annot"><span class="annottext">prev_dep_plgn :: [ModuleName]
</span><a href="#local-6989586621681177656"><span class="hs-identifier hs-var hs-var">prev_dep_plgn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Dependencies -&gt; [ModuleName]
</span><a href="GHC.Driver.Types.html#dep_plgins"><span class="hs-identifier hs-var hs-var">dep_plgins</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177673"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-449"></span><span>   </span><span id="local-6989586621681177654"><span class="annot"><span class="annottext">prev_dep_pkgs :: [(UnitId, Bool)]
</span><a href="#local-6989586621681177654"><span class="hs-identifier hs-var hs-var">prev_dep_pkgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Dependencies -&gt; [(UnitId, Bool)]
</span><a href="GHC.Driver.Types.html#dep_pkgs"><span class="hs-identifier hs-var hs-var">dep_pkgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177673"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span>   </span><span id="local-6989586621681177652"><span class="annot"><span class="annottext">this_pkg :: Unit
</span><a href="#local-6989586621681177652"><span class="hs-identifier hs-var hs-var">this_pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Unit
</span><a href="GHC.Driver.Session.html#homeUnit"><span class="hs-identifier hs-var">homeUnit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177675"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-452"></span><span>
</span><span id="line-453"></span><span>   </span><span id="local-6989586621681177672"><span class="annot"><span class="annottext">dep_missing :: (Maybe FastString, GenLocated l ModuleName)
-&gt; IOEnv (Env m n) RecompileRequired
</span><a href="#local-6989586621681177672"><span class="hs-identifier hs-var hs-var">dep_missing</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177631"><span class="annot"><span class="annottext">Maybe FastString
</span><a href="#local-6989586621681177631"><span class="hs-identifier hs-var">mb_pkg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">l
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177629"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177629"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-454"></span><span>     </span><span id="local-6989586621681177628"><span class="annot"><span class="annottext">FindResult
</span><a href="#local-6989586621681177628"><span class="hs-identifier hs-var">find_res</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO FindResult -&gt; IOEnv (Env m n) FindResult
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO FindResult -&gt; IOEnv (Env m n) FindResult)
-&gt; IO FindResult -&gt; IOEnv (Env m n) FindResult
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ModuleName -&gt; Maybe FastString -&gt; IO FindResult
</span><a href="GHC.Driver.Finder.html#findImportedModule"><span class="hs-identifier hs-var">findImportedModule</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177675"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177629"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe FastString
</span><a href="#local-6989586621681177631"><span class="hs-identifier hs-var">mb_pkg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-455"></span><span>     </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177626"><span class="annot"><span class="annottext">reason :: String
</span><a href="#local-6989586621681177626"><span class="hs-identifier hs-var hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var">moduleNameString</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177629"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; changed&quot;</span></span><span>
</span><span id="line-456"></span><span>     </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FindResult
</span><a href="#local-6989586621681177628"><span class="hs-identifier hs-var">find_res</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-457"></span><span>        </span><span class="annot"><a href="GHC.Driver.Types.html#Found"><span class="hs-identifier hs-type">Found</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177623"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177623"><span class="hs-identifier hs-var">mod</span></a></span></span><span>
</span><span id="line-458"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177622"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177652"><span class="hs-identifier hs-var">this_pkg</span></a></span><span>
</span><span id="line-459"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177623"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; [ModuleName] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#notElem"><span class="hs-operator hs-var">`notElem`</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleNameWithIsBoot -&gt; ModuleName)
-&gt; [ModuleNameWithIsBoot] -&gt; [ModuleName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleNameWithIsBoot -&gt; ModuleName
forall mod. GenWithIsBoot mod -&gt; mod
</span><a href="GHC.Unit.Types.html#gwib_mod"><span class="hs-identifier hs-var hs-var">gwib_mod</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleNameWithIsBoot]
</span><a href="#local-6989586621681177657"><span class="hs-identifier hs-var">prev_dep_mods</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; [ModuleName] -&gt; [ModuleName]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621681177656"><span class="hs-identifier hs-var">prev_dep_plgn</span></a></span><span>
</span><span id="line-460"></span><span>                 </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; TcRnIf m n ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; TcRnIf m n ()) -&gt; SDoc -&gt; TcRnIf m n ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-461"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;imported module &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177623"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-462"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; not among previous dependencies&quot;</span></span><span>
</span><span id="line-463"></span><span>                         </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177626"><span class="hs-identifier hs-var">reason</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-464"></span><span>                 </span><span class="hs-keyword">else</span><span>
</span><span id="line-465"></span><span>                         </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-466"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-467"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Unit -&gt; UnitId
</span><a href="GHC.Unit.Types.html#toUnitId"><span class="hs-identifier hs-var">toUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177622"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; [UnitId] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#notElem"><span class="hs-operator hs-var">`notElem`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((UnitId, Bool) -&gt; UnitId) -&gt; [(UnitId, Bool)] -&gt; [UnitId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(UnitId, Bool) -&gt; UnitId
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnitId, Bool)]
</span><a href="#local-6989586621681177654"><span class="hs-identifier hs-var">prev_dep_pkgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-468"></span><span>                 </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; TcRnIf m n ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; TcRnIf m n ()) -&gt; SDoc -&gt; TcRnIf m n ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-469"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;imported module &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177623"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-470"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is from package &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unit -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177622"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-471"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, which is not among previous dependencies&quot;</span></span><span>
</span><span id="line-472"></span><span>                         </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177626"><span class="hs-identifier hs-var">reason</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-473"></span><span>                 </span><span class="hs-keyword">else</span><span>
</span><span id="line-474"></span><span>                         </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-475"></span><span>           </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681177622"><span class="annot"><span class="annottext">pkg :: Unit
</span><a href="#local-6989586621681177622"><span class="hs-identifier hs-var hs-var">pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177623"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-476"></span><span>        </span><span id="local-6989586621681177617"><span class="annot"><span class="annottext">FindResult
</span><a href="#local-6989586621681177617"><span class="hs-identifier hs-var">_otherwise</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177626"><span class="hs-identifier hs-var">reason</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-477"></span><span>
</span><span id="line-478"></span><span>   </span><span id="local-6989586621681177614"><span class="annot"><span class="annottext">projectNonBootNames :: [GenWithIsBoot b] -&gt; [b]
</span><a href="#local-6989586621681177614"><span class="hs-identifier hs-var hs-var">projectNonBootNames</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenWithIsBoot b -&gt; b) -&gt; [GenWithIsBoot b] -&gt; [b]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenWithIsBoot b -&gt; b
forall mod. GenWithIsBoot mod -&gt; mod
</span><a href="GHC.Unit.Types.html#gwib_mod"><span class="hs-identifier hs-var hs-var">gwib_mod</span></a></span><span> </span><span class="annot"><span class="annottext">([GenWithIsBoot b] -&gt; [b])
-&gt; ([GenWithIsBoot b] -&gt; [GenWithIsBoot b])
-&gt; [GenWithIsBoot b]
-&gt; [b]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(GenWithIsBoot b -&gt; Bool) -&gt; [GenWithIsBoot b] -&gt; [GenWithIsBoot b]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">IsBootInterface -&gt; IsBootInterface -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#NotBoot"><span class="hs-identifier hs-var">NotBoot</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IsBootInterface -&gt; Bool)
-&gt; (GenWithIsBoot b -&gt; IsBootInterface) -&gt; GenWithIsBoot b -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenWithIsBoot b -&gt; IsBootInterface
forall mod. GenWithIsBoot mod -&gt; IsBootInterface
</span><a href="GHC.Unit.Types.html#gwib_isBoot"><span class="hs-identifier hs-var hs-var">gwib_isBoot</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-479"></span><span>   </span><span id="local-6989586621681177609"><span class="annot"><span class="annottext">old_deps :: Set ModuleName
</span><a href="#local-6989586621681177609"><span class="hs-identifier hs-var hs-var">old_deps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Set ModuleName
forall a. Ord a =&gt; [a] -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#fromList"><span class="hs-identifier hs-var">Set.fromList</span></a></span><span>
</span><span id="line-480"></span><span>     </span><span class="annot"><span class="annottext">([ModuleName] -&gt; Set ModuleName) -&gt; [ModuleName] -&gt; Set ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleNameWithIsBoot] -&gt; [ModuleName]
forall {b}. [GenWithIsBoot b] -&gt; [b]
</span><a href="#local-6989586621681177614"><span class="hs-identifier hs-var">projectNonBootNames</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleNameWithIsBoot]
</span><a href="#local-6989586621681177657"><span class="hs-identifier hs-var">prev_dep_mods</span></a></span><span>
</span><span id="line-481"></span><span>   </span><span id="local-6989586621681177607"><span class="annot"><span class="annottext">isOldHomeDeps :: ModuleName -&gt; Bool
</span><a href="#local-6989586621681177607"><span class="hs-identifier hs-var hs-var">isOldHomeDeps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; Set ModuleName -&gt; Bool)
-&gt; Set ModuleName -&gt; ModuleName -&gt; Bool
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Set ModuleName -&gt; Bool
forall a. Ord a =&gt; a -&gt; Set a -&gt; Bool
</span><a href="../../containers/src/Data.Set.Internal.html#member"><span class="hs-identifier hs-var">Set.member</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621681177609"><span class="hs-identifier hs-var">old_deps</span></a></span><span>
</span><span id="line-482"></span><span>   </span><span id="local-6989586621681177666"><span class="annot"><span class="annottext">checkForNewHomeDependency :: GenLocated l ModuleName
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
</span><a href="#local-6989586621681177666"><span class="hs-identifier hs-var hs-var">checkForNewHomeDependency</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">l
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177594"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177594"><span class="hs-identifier hs-var">mname</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-483"></span><span>     </span><span class="hs-keyword">let</span><span>
</span><span id="line-484"></span><span>       </span><span id="local-6989586621681177593"><span class="annot"><span class="annottext">mod :: Module
</span><a href="#local-6989586621681177593"><span class="hs-identifier hs-var hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unit -&gt; ModuleName -&gt; Module
forall u. u -&gt; ModuleName -&gt; GenModule u
</span><a href="GHC.Unit.Types.html#mkModule"><span class="hs-identifier hs-var">mkModule</span></a></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177652"><span class="hs-identifier hs-var">this_pkg</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177594"><span class="hs-identifier hs-var">mname</span></a></span><span>
</span><span id="line-485"></span><span>       </span><span id="local-6989586621681177591"><span class="annot"><span class="annottext">str_mname :: String
</span><a href="#local-6989586621681177591"><span class="hs-identifier hs-var hs-var">str_mname</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var">moduleNameString</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177594"><span class="hs-identifier hs-var">mname</span></a></span><span>
</span><span id="line-486"></span><span>       </span><span id="local-6989586621681177590"><span class="annot"><span class="annottext">reason :: String
</span><a href="#local-6989586621681177590"><span class="hs-identifier hs-var hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177591"><span class="hs-identifier hs-var">str_mname</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; changed&quot;</span></span><span>
</span><span id="line-487"></span><span>     </span><span class="hs-comment">-- We only want to look at home modules to check if any new home dependency</span><span>
</span><span id="line-488"></span><span>     </span><span class="hs-comment">-- pops in and thus here, skip modules that are not home. Checking</span><span>
</span><span id="line-489"></span><span>     </span><span class="hs-comment">-- membership in old home dependencies suffice because the `dep_missing`</span><span>
</span><span id="line-490"></span><span>     </span><span class="hs-comment">-- check already verified that all imported home modules are present there.</span><span>
</span><span id="line-491"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; Bool
</span><a href="#local-6989586621681177607"><span class="hs-identifier hs-var">isOldHomeDeps</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177594"><span class="hs-identifier hs-var">mname</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-492"></span><span>       </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, [ModuleName])
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-493"></span><span>       </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-494"></span><span>         </span><span id="local-6989586621681177589"><span class="annot"><span class="annottext">Maybe (RecompileRequired, [ModuleName])
</span><a href="#local-6989586621681177589"><span class="hs-identifier hs-var">mb_result</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String
-&gt; Module
-&gt; (ModIface
    -&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName]))
-&gt; IfG (Maybe (RecompileRequired, [ModuleName]))
forall a. String -&gt; Module -&gt; (ModIface -&gt; IfG a) -&gt; IfG (Maybe a)
</span><a href="GHC.Iface.Recomp.html#getFromModIface"><span class="hs-identifier hs-var">getFromModIface</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;need mi_deps for&quot;</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177593"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">((ModIface
  -&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName]))
 -&gt; IfG (Maybe (RecompileRequired, [ModuleName])))
-&gt; (ModIface
    -&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName]))
-&gt; IfG (Maybe (RecompileRequired, [ModuleName]))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681177587"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177587"><span class="hs-identifier hs-var">imported_iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-495"></span><span>           </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177585"><span class="annot"><span class="annottext">mnames :: [ModuleName]
</span><a href="#local-6989586621681177585"><span class="hs-identifier hs-var hs-var">mnames</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177594"><span class="hs-identifier hs-var">mname</span></a></span><span class="annot"><span class="annottext">ModuleName -&gt; [ModuleName] -&gt; [ModuleName]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModuleNameWithIsBoot -&gt; ModuleName)
-&gt; [ModuleNameWithIsBoot] -&gt; [ModuleName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleNameWithIsBoot -&gt; ModuleName
forall mod. GenWithIsBoot mod -&gt; mod
</span><a href="GHC.Unit.Types.html#gwib_mod"><span class="hs-identifier hs-var hs-var">gwib_mod</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleNameWithIsBoot] -&gt; [ModuleName])
-&gt; [ModuleNameWithIsBoot] -&gt; [ModuleName]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleNameWithIsBoot -&gt; Bool)
-&gt; [ModuleNameWithIsBoot] -&gt; [ModuleNameWithIsBoot]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">IsBootInterface -&gt; IsBootInterface -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#NotBoot"><span class="hs-identifier hs-var">NotBoot</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IsBootInterface -&gt; Bool)
-&gt; (ModuleNameWithIsBoot -&gt; IsBootInterface)
-&gt; ModuleNameWithIsBoot
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleNameWithIsBoot -&gt; IsBootInterface
forall mod. GenWithIsBoot mod -&gt; IsBootInterface
</span><a href="GHC.Unit.Types.html#gwib_isBoot"><span class="hs-identifier hs-var hs-var">gwib_isBoot</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([ModuleNameWithIsBoot] -&gt; [ModuleNameWithIsBoot])
-&gt; [ModuleNameWithIsBoot] -&gt; [ModuleNameWithIsBoot]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-496"></span><span>                 </span><span class="annot"><span class="annottext">Dependencies -&gt; [ModuleNameWithIsBoot]
</span><a href="GHC.Driver.Types.html#dep_mods"><span class="hs-identifier hs-var hs-var">dep_mods</span></a></span><span> </span><span class="annot"><span class="annottext">(Dependencies -&gt; [ModuleNameWithIsBoot])
-&gt; Dependencies -&gt; [ModuleNameWithIsBoot]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177587"><span class="hs-identifier hs-var">imported_iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span>           </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; Bool) -&gt; [ModuleName] -&gt; Maybe ModuleName
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Maybe a
</span><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier hs-var">find</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (ModuleName -&gt; Bool) -&gt; ModuleName -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Bool
</span><a href="#local-6989586621681177607"><span class="hs-identifier hs-var">isOldHomeDeps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621681177585"><span class="hs-identifier hs-var">mnames</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-498"></span><span>             </span><span class="annot"><span class="annottext">Maybe ModuleName
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, [ModuleName])
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621681177585"><span class="hs-identifier hs-var">mnames</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-499"></span><span>             </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177584"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177584"><span class="hs-identifier hs-var">new_dep_mname</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-500"></span><span>               </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; IOEnv (Env IfGblEnv ()) ())
-&gt; SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-501"></span><span>                 </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;imported home module &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177593"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-502"></span><span>                 </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; has a new dependency &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177584"><span class="hs-identifier hs-var">new_dep_mname</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-503"></span><span>               </span><span class="annot"><span class="annottext">(RecompileRequired, [ModuleName])
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177590"><span class="hs-identifier hs-var">reason</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-504"></span><span>         </span><span class="annot"><span class="annottext">(RecompileRequired, [ModuleName])
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">((RecompileRequired, [ModuleName])
 -&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName]))
-&gt; (RecompileRequired, [ModuleName])
-&gt; IOEnv (Env IfGblEnv ()) (RecompileRequired, [ModuleName])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, [ModuleName])
-&gt; Maybe (RecompileRequired, [ModuleName])
-&gt; (RecompileRequired, [ModuleName])
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#MustCompile"><span class="hs-identifier hs-var">MustCompile</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe (RecompileRequired, [ModuleName])
</span><a href="#local-6989586621681177589"><span class="hs-identifier hs-var">mb_result</span></a></span><span>
</span><span id="line-505"></span><span>
</span><span id="line-506"></span><span>   </span><span class="hs-comment">-- Performs all recompilation checks in the list until a check that yields</span><span>
</span><span id="line-507"></span><span>   </span><span class="hs-comment">-- recompile required is encountered. Returns the list of the results of</span><span>
</span><span id="line-508"></span><span>   </span><span class="hs-comment">-- all UpToDate checks.</span><span>
</span><span id="line-509"></span><span>   </span><span id="local-6989586621681177667"><span class="annot"><span class="annottext">runUntilRecompRequired :: [m (RecompileRequired, a)] -&gt; m (RecompileRequired, [a])
</span><a href="#local-6989586621681177667"><span class="hs-identifier hs-var hs-var">runUntilRecompRequired</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, [a]) -&gt; m (RecompileRequired, [a])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-510"></span><span>   </span><span class="annot"><a href="#local-6989586621681177667"><span class="hs-identifier hs-var">runUntilRecompRequired</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177576"><span class="annot"><span class="annottext">m (RecompileRequired, a)
</span><a href="#local-6989586621681177576"><span class="hs-identifier hs-var">check</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681177575"><span class="annot"><span class="annottext">[m (RecompileRequired, a)]
</span><a href="#local-6989586621681177575"><span class="hs-identifier hs-var">checks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-511"></span><span>     </span><span class="hs-special">(</span><span id="local-6989586621681177574"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177574"><span class="hs-identifier hs-var">recompile</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177573"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681177573"><span class="hs-identifier hs-var">value</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (RecompileRequired, a)
</span><a href="#local-6989586621681177576"><span class="hs-identifier hs-var">check</span></a></span><span>
</span><span id="line-512"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177574"><span class="hs-identifier hs-var">recompile</span></a></span><span>
</span><span id="line-513"></span><span>       </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(RecompileRequired, [a]) -&gt; m (RecompileRequired, [a])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177574"><span class="hs-identifier hs-var">recompile</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>       </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-515"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621681177572"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177572"><span class="hs-identifier hs-var">recomp</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177571"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681177571"><span class="hs-identifier hs-var">values</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[m (RecompileRequired, a)] -&gt; m (RecompileRequired, [a])
</span><a href="#local-6989586621681177667"><span class="hs-identifier hs-var">runUntilRecompRequired</span></a></span><span> </span><span class="annot"><span class="annottext">[m (RecompileRequired, a)]
</span><a href="#local-6989586621681177575"><span class="hs-identifier hs-var">checks</span></a></span><span>
</span><span id="line-516"></span><span>         </span><span class="annot"><span class="annottext">(RecompileRequired, [a]) -&gt; m (RecompileRequired, [a])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177572"><span class="hs-identifier hs-var">recomp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681177573"><span class="hs-identifier hs-var">value</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681177571"><span class="hs-identifier hs-var">values</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-517"></span><span>
</span><span id="line-518"></span><span>   </span><span id="local-6989586621681177658"><span class="annot"><span class="annottext">checkIfAllOldHomeDependenciesAreSeen :: Set ModuleName -&gt; IOEnv (Env m n) RecompileRequired
</span><a href="#local-6989586621681177658"><span class="hs-identifier hs-var hs-var">checkIfAllOldHomeDependenciesAreSeen</span></a></span></span><span> </span><span id="local-6989586621681177564"><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621681177564"><span class="hs-identifier hs-var">seen_deps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-519"></span><span>     </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177562"><span class="annot"><span class="annottext">unseen_old_deps :: Set ModuleName
</span><a href="#local-6989586621681177562"><span class="hs-identifier hs-var hs-var">unseen_old_deps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set ModuleName -&gt; Set ModuleName -&gt; Set ModuleName
forall a. Ord a =&gt; Set a -&gt; Set a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#difference"><span class="hs-identifier hs-var">Set.difference</span></a></span><span>
</span><span id="line-520"></span><span>          </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621681177609"><span class="hs-identifier hs-var">old_deps</span></a></span><span>
</span><span id="line-521"></span><span>          </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621681177564"><span class="hs-identifier hs-var">seen_deps</span></a></span><span>
</span><span id="line-522"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Set ModuleName -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621681177562"><span class="hs-identifier hs-var">unseen_old_deps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-523"></span><span>       </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-524"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177559"><span class="annot"><span class="annottext">missing_dep :: ModuleName
</span><a href="#local-6989586621681177559"><span class="hs-identifier hs-var hs-var">missing_dep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Set ModuleName -&gt; ModuleName
forall a. Int -&gt; Set a -&gt; a
</span><a href="../../containers/src/Data.Set.Internal.html#elemAt"><span class="hs-identifier hs-var">Set.elemAt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621681177562"><span class="hs-identifier hs-var">unseen_old_deps</span></a></span><span>
</span><span id="line-525"></span><span>         </span><span class="annot"><span class="annottext">SDoc -&gt; TcRnIf m n ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; TcRnIf m n ()) -&gt; SDoc -&gt; TcRnIf m n ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-526"></span><span>           </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;missing old home dependency &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177559"><span class="hs-identifier hs-var">missing_dep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-527"></span><span>         </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired)
-&gt; RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;missing old dependency&quot;</span></span><span>
</span><span id="line-528"></span><span>       </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IOEnv (Env m n) RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-529"></span><span>
</span><span id="line-530"></span><span class="annot"><a href="GHC.Iface.Recomp.html#needInterface"><span class="hs-identifier hs-type">needInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-531"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-532"></span><span id="needInterface"><span class="annot"><span class="annottext">needInterface :: Module
-&gt; (ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#needInterface"><span class="hs-identifier hs-var hs-var">needInterface</span></a></span></span><span> </span><span id="local-6989586621681177556"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177556"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681177555"><span class="annot"><span class="annottext">ModIface -&gt; IfG RecompileRequired
</span><a href="#local-6989586621681177555"><span class="hs-identifier hs-var">continue</span></a></span></span><span>
</span><span id="line-533"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-534"></span><span>      </span><span id="local-6989586621681177554"><span class="annot"><span class="annottext">Maybe RecompileRequired
</span><a href="#local-6989586621681177554"><span class="hs-identifier hs-var">mb_recomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String
-&gt; Module
-&gt; (ModIface -&gt; IfG RecompileRequired)
-&gt; IfG (Maybe RecompileRequired)
forall a. String -&gt; Module -&gt; (ModIface -&gt; IfG a) -&gt; IfG (Maybe a)
</span><a href="GHC.Iface.Recomp.html#getFromModIface"><span class="hs-identifier hs-var">getFromModIface</span></a></span><span>
</span><span id="line-535"></span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;need version info for&quot;</span></span><span>
</span><span id="line-536"></span><span>        </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177556"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-537"></span><span>        </span><span class="annot"><span class="annottext">ModIface -&gt; IfG RecompileRequired
</span><a href="#local-6989586621681177555"><span class="hs-identifier hs-var">continue</span></a></span><span>
</span><span id="line-538"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe RecompileRequired
</span><a href="#local-6989586621681177554"><span class="hs-identifier hs-var">mb_recomp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-539"></span><span>        </span><span class="annot"><span class="annottext">Maybe RecompileRequired
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#MustCompile"><span class="hs-identifier hs-var">MustCompile</span></a></span><span>
</span><span id="line-540"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177553"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177553"><span class="hs-identifier hs-var">recomp</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177553"><span class="hs-identifier hs-var">recomp</span></a></span><span>
</span><span id="line-541"></span><span>
</span><span id="line-542"></span><span id="local-6989586621681178281"><span class="annot"><a href="GHC.Iface.Recomp.html#getFromModIface"><span class="hs-identifier hs-type">getFromModIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681178281"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-543"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681178281"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-544"></span><span id="getFromModIface"><span class="annot"><span class="annottext">getFromModIface :: forall a. String -&gt; Module -&gt; (ModIface -&gt; IfG a) -&gt; IfG (Maybe a)
</span><a href="GHC.Iface.Recomp.html#getFromModIface"><span class="hs-identifier hs-var hs-var">getFromModIface</span></a></span></span><span> </span><span id="local-6989586621681177544"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177544"><span class="hs-identifier hs-var">doc_msg</span></a></span></span><span> </span><span id="local-6989586621681177543"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177543"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681177542"><span class="annot"><span class="annottext">ModIface -&gt; IfG a
</span><a href="#local-6989586621681177542"><span class="hs-identifier hs-var">getter</span></a></span></span><span>
</span><span id="line-545"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-comment">-- Load the imported interface if possible</span><span>
</span><span id="line-546"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177540"><span class="annot"><span class="annottext">doc_str :: SDoc
</span><a href="#local-6989586621681177540"><span class="hs-identifier hs-var hs-var">doc_str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177544"><span class="hs-identifier hs-var">doc_msg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177543"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-547"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Checking innterface for module&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177543"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-548"></span><span>
</span><span id="line-549"></span><span>    </span><span id="local-6989586621681177538"><span class="annot"><span class="annottext">MaybeErr SDoc ModIface
</span><a href="#local-6989586621681177538"><span class="hs-identifier hs-var">mb_iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Module -&gt; WhereFrom -&gt; IfM () (MaybeErr SDoc ModIface)
forall lcl.
SDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr SDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var">loadInterface</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177540"><span class="hs-identifier hs-var">doc_str</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177543"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportBySystem"><span class="hs-identifier hs-var">ImportBySystem</span></a></span><span>
</span><span id="line-550"></span><span>        </span><span class="hs-comment">-- Load the interface, but don't complain on failure;</span><span>
</span><span id="line-551"></span><span>        </span><span class="hs-comment">-- Instead, get an Either back which we can test</span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr SDoc ModIface
</span><a href="#local-6989586621681177538"><span class="hs-identifier hs-var">mb_iface</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-554"></span><span>      </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-555"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Couldn't load interface for module&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-556"></span><span>                           </span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177543"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-557"></span><span>        </span><span class="annot"><span class="annottext">Maybe a -&gt; IfG (Maybe a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-558"></span><span>                  </span><span class="hs-comment">-- Couldn't find or parse a module mentioned in the</span><span>
</span><span id="line-559"></span><span>                  </span><span class="hs-comment">-- old interface file.  Don't complain: it might</span><span>
</span><span id="line-560"></span><span>                  </span><span class="hs-comment">-- just be that the current module doesn't need that</span><span>
</span><span id="line-561"></span><span>                  </span><span class="hs-comment">-- import and it's been deleted</span><span>
</span><span id="line-562"></span><span>      </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span id="local-6989586621681177535"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177535"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; IfG a -&gt; IfG (Maybe a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; IfG a
</span><a href="#local-6989586621681177542"><span class="hs-identifier hs-var">getter</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177535"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-563"></span><span>
</span><span id="line-564"></span><span class="hs-comment">-- | Given the usage information extracted from the old</span><span>
</span><span id="line-565"></span><span class="hs-comment">-- M.hi file for the module being compiled, figure out</span><span>
</span><span id="line-566"></span><span class="hs-comment">-- whether M needs to be recompiled.</span><span>
</span><span id="line-567"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkModUsage"><span class="hs-identifier hs-type">checkModUsage</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Unit"><span class="hs-identifier hs-type">Unit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Usage"><span class="hs-identifier hs-type">Usage</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-568"></span><span id="checkModUsage"><span class="annot"><span class="annottext">checkModUsage :: Unit -&gt; Usage -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkModUsage"><span class="hs-identifier hs-var hs-var">checkModUsage</span></a></span></span><span> </span><span id="local-6989586621681177534"><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177534"><span class="hs-identifier hs-var">_this_pkg</span></a></span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#UsagePackageModule"><span class="hs-identifier hs-type">UsagePackageModule</span></a></span><span class="hs-special">{</span><span>
</span><span id="line-569"></span><span>                                </span><span class="annot"><span class="annottext">usg_mod :: Usage -&gt; Module
</span><a href="GHC.Driver.Types.html#usg_mod"><span class="hs-identifier hs-var">usg_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177532"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177532"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-570"></span><span>                                </span><span class="annot"><span class="annottext">usg_mod_hash :: Usage -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#usg_mod_hash"><span class="hs-identifier hs-var">usg_mod_hash</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177530"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177530"><span class="hs-identifier hs-var">old_mod_hash</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-571"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
-&gt; (ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#needInterface"><span class="hs-identifier hs-var">needInterface</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177532"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">((ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired)
-&gt; (ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681177529"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177529"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-572"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177528"><span class="annot"><span class="annottext">reason :: String
</span><a href="#local-6989586621681177528"><span class="hs-identifier hs-var hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var">moduleNameString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177532"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; changed&quot;</span></span><span>
</span><span id="line-573"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkModuleFingerprint"><span class="hs-identifier hs-var">checkModuleFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177528"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177530"><span class="hs-identifier hs-var">old_mod_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_mod_hash"><span class="hs-identifier hs-var hs-var">mi_mod_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177529"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-574"></span><span>        </span><span class="hs-comment">-- We only track the ABI hash of package modules, rather than</span><span>
</span><span id="line-575"></span><span>        </span><span class="hs-comment">-- individual entity usages, so if the ABI hash changes we must</span><span>
</span><span id="line-576"></span><span>        </span><span class="hs-comment">-- recompile.  This is safe but may entail more recompilation when</span><span>
</span><span id="line-577"></span><span>        </span><span class="hs-comment">-- a dependent package has changed.</span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkModUsage"><span class="hs-identifier hs-var">checkModUsage</span></a></span><span> </span><span class="annot"><span class="annottext">Unit
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#UsageMergedRequirement"><span class="hs-identifier hs-type">UsageMergedRequirement</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">usg_mod :: Usage -&gt; Module
</span><a href="GHC.Driver.Types.html#usg_mod"><span class="hs-identifier hs-var">usg_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177525"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177525"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">usg_mod_hash :: Usage -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#usg_mod_hash"><span class="hs-identifier hs-var">usg_mod_hash</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177524"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177524"><span class="hs-identifier hs-var">old_mod_hash</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-580"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
-&gt; (ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#needInterface"><span class="hs-identifier hs-var">needInterface</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177525"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">((ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired)
-&gt; (ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681177523"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177523"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-581"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177522"><span class="annot"><span class="annottext">reason :: String
</span><a href="#local-6989586621681177522"><span class="hs-identifier hs-var hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var">moduleNameString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177525"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; changed (raw)&quot;</span></span><span>
</span><span id="line-582"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkModuleFingerprint"><span class="hs-identifier hs-var">checkModuleFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177522"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177524"><span class="hs-identifier hs-var">old_mod_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_mod_hash"><span class="hs-identifier hs-var hs-var">mi_mod_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177523"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-583"></span><span>
</span><span id="line-584"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkModUsage"><span class="hs-identifier hs-var">checkModUsage</span></a></span><span> </span><span id="local-6989586621681177521"><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177521"><span class="hs-identifier hs-var">this_pkg</span></a></span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#UsageHomeModule"><span class="hs-identifier hs-type">UsageHomeModule</span></a></span><span class="hs-special">{</span><span>
</span><span id="line-585"></span><span>                                </span><span class="annot"><span class="annottext">usg_mod_name :: Usage -&gt; ModuleName
</span><a href="GHC.Driver.Types.html#usg_mod_name"><span class="hs-identifier hs-var">usg_mod_name</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177518"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177518"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-586"></span><span>                                </span><span class="annot"><span class="annottext">usg_mod_hash :: Usage -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#usg_mod_hash"><span class="hs-identifier hs-var">usg_mod_hash</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177517"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177517"><span class="hs-identifier hs-var">old_mod_hash</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-587"></span><span>                                </span><span class="annot"><span class="annottext">usg_exports :: Usage -&gt; Maybe Fingerprint
</span><a href="GHC.Driver.Types.html#usg_exports"><span class="hs-identifier hs-var">usg_exports</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177515"><span class="annot"><span class="annottext">Maybe Fingerprint
</span><a href="#local-6989586621681177515"><span class="hs-identifier hs-var">maybe_old_export_hash</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-588"></span><span>                                </span><span class="annot"><span class="annottext">usg_entities :: Usage -&gt; [(OccName, Fingerprint)]
</span><a href="GHC.Driver.Types.html#usg_entities"><span class="hs-identifier hs-var">usg_entities</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177513"><span class="annot"><span class="annottext">[(OccName, Fingerprint)]
</span><a href="#local-6989586621681177513"><span class="hs-identifier hs-var">old_decl_hash</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-589"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-590"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177512"><span class="annot"><span class="annottext">mod :: Module
</span><a href="#local-6989586621681177512"><span class="hs-identifier hs-var hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unit -&gt; ModuleName -&gt; Module
forall u. u -&gt; ModuleName -&gt; GenModule u
</span><a href="GHC.Unit.Types.html#mkModule"><span class="hs-identifier hs-var">mkModule</span></a></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177521"><span class="hs-identifier hs-var">this_pkg</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177518"><span class="hs-identifier hs-var">mod_name</span></a></span><span>
</span><span id="line-591"></span><span>    </span><span class="annot"><span class="annottext">Module
-&gt; (ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#needInterface"><span class="hs-identifier hs-var">needInterface</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177512"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">((ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired)
-&gt; (ModIface -&gt; IfG RecompileRequired) -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681177511"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177511"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-592"></span><span>
</span><span id="line-593"></span><span>       </span><span class="hs-keyword">let</span><span>
</span><span id="line-594"></span><span>           </span><span id="local-6989586621681177510"><span class="annot"><span class="annottext">new_mod_hash :: Fingerprint
</span><a href="#local-6989586621681177510"><span class="hs-identifier hs-var hs-var">new_mod_hash</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_mod_hash"><span class="hs-identifier hs-var hs-var">mi_mod_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177511"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-595"></span><span>           </span><span id="local-6989586621681177509"><span class="annot"><span class="annottext">new_decl_hash :: OccName -&gt; Maybe (OccName, Fingerprint)
</span><a href="#local-6989586621681177509"><span class="hs-identifier hs-var hs-var">new_decl_hash</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; OccName -&gt; Maybe (OccName, Fingerprint)
</span><a href="GHC.Driver.Types.html#mi_hash_fn"><span class="hs-identifier hs-var hs-var">mi_hash_fn</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177511"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-596"></span><span>           </span><span id="local-6989586621681177507"><span class="annot"><span class="annottext">new_export_hash :: Fingerprint
</span><a href="#local-6989586621681177507"><span class="hs-identifier hs-var hs-var">new_export_hash</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_exp_hash"><span class="hs-identifier hs-var hs-var">mi_exp_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177511"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-597"></span><span>
</span><span id="line-598"></span><span>           </span><span id="local-6989586621681177505"><span class="annot"><span class="annottext">reason :: String
</span><a href="#local-6989586621681177505"><span class="hs-identifier hs-var hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var">moduleNameString</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681177518"><span class="hs-identifier hs-var">mod_name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; changed&quot;</span></span><span>
</span><span id="line-599"></span><span>
</span><span id="line-600"></span><span>           </span><span class="hs-comment">-- CHECK MODULE</span><span>
</span><span id="line-601"></span><span>       </span><span id="local-6989586621681177504"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177504"><span class="hs-identifier hs-var">recompile</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkModuleFingerprint"><span class="hs-identifier hs-var">checkModuleFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177505"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177517"><span class="hs-identifier hs-var">old_mod_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177510"><span class="hs-identifier hs-var">new_mod_hash</span></a></span><span>
</span><span id="line-602"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177504"><span class="hs-identifier hs-var">recompile</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-603"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-604"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-605"></span><span>
</span><span id="line-606"></span><span>           </span><span class="hs-comment">-- CHECK EXPORT LIST</span><span>
</span><span id="line-607"></span><span>           </span><span class="annot"><span class="annottext">String
-&gt; Maybe Fingerprint
-&gt; Fingerprint
-&gt; SDoc
-&gt; IfG RecompileRequired
-&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkMaybeHash"><span class="hs-identifier hs-var">checkMaybeHash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177505"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fingerprint
</span><a href="#local-6989586621681177515"><span class="hs-identifier hs-var">maybe_old_export_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177507"><span class="hs-identifier hs-var">new_export_hash</span></a></span><span>
</span><span id="line-608"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  Export list changed&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IfG RecompileRequired -&gt; IfG RecompileRequired)
-&gt; IfG RecompileRequired -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-609"></span><span>
</span><span id="line-610"></span><span>                 </span><span class="hs-comment">-- CHECK ITEMS ONE BY ONE</span><span>
</span><span id="line-611"></span><span>                 </span><span id="local-6989586621681177502"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177502"><span class="hs-identifier hs-var">recompile</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfG RecompileRequired] -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-var">checkList</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
-&gt; (OccName -&gt; Maybe (OccName, Fingerprint))
-&gt; (OccName, Fingerprint)
-&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkEntityUsage"><span class="hs-identifier hs-var">checkEntityUsage</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177505"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Maybe (OccName, Fingerprint)
</span><a href="#local-6989586621681177509"><span class="hs-identifier hs-var">new_decl_hash</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName, Fingerprint)
</span><a href="#local-6989586621681177500"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-612"></span><span>                                        </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681177500"><span class="annot"><span class="annottext">(OccName, Fingerprint)
</span><a href="#local-6989586621681177500"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(OccName, Fingerprint)]
</span><a href="#local-6989586621681177513"><span class="hs-identifier hs-var">old_decl_hash</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-613"></span><span>                 </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177502"><span class="hs-identifier hs-var">recompile</span></a></span><span>
</span><span id="line-614"></span><span>                   </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177502"><span class="hs-identifier hs-var">recompile</span></a></span><span>     </span><span class="hs-comment">-- This one failed, so just bail out now</span><span>
</span><span id="line-615"></span><span>                   </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  Great!  The bits I use are up to date&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span>
</span><span id="line-618"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkModUsage"><span class="hs-identifier hs-var">checkModUsage</span></a></span><span> </span><span id="local-6989586621681177499"><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621681177499"><span class="hs-identifier hs-var">_this_pkg</span></a></span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#UsageFile"><span class="hs-identifier hs-type">UsageFile</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">usg_file_path :: Usage -&gt; String
</span><a href="GHC.Driver.Types.html#usg_file_path"><span class="hs-identifier hs-var">usg_file_path</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177496"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177496"><span class="hs-identifier hs-var">file</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-619"></span><span>                                   </span><span class="annot"><span class="annottext">usg_file_hash :: Usage -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#usg_file_hash"><span class="hs-identifier hs-var">usg_file_hash</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177494"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177494"><span class="hs-identifier hs-var">old_hash</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-620"></span><span>  </span><span class="annot"><span class="annottext">IO RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO RecompileRequired -&gt; IfG RecompileRequired)
-&gt; IO RecompileRequired -&gt; IfG RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-621"></span><span>    </span><span class="annot"><span class="annottext">(IOException -&gt; IO RecompileRequired)
-&gt; IO RecompileRequired -&gt; IO RecompileRequired
forall a. (IOException -&gt; IO a) -&gt; IO a -&gt; IO a
</span><a href="GHC.Utils.Exception.html#handleIO"><span class="hs-identifier hs-var">handleIO</span></a></span><span> </span><span class="annot"><span class="annottext">IOException -&gt; IO RecompileRequired
forall {p}. p -&gt; IO RecompileRequired
</span><a href="#local-6989586621681177492"><span class="hs-identifier hs-var">handler</span></a></span><span> </span><span class="annot"><span class="annottext">(IO RecompileRequired -&gt; IO RecompileRequired)
-&gt; IO RecompileRequired -&gt; IO RecompileRequired
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-622"></span><span>      </span><span id="local-6989586621681177491"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177491"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#getFileHash"><span class="hs-identifier hs-var">getFileHash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177496"><span class="hs-identifier hs-var">file</span></a></span><span>
</span><span id="line-623"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177494"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177491"><span class="hs-identifier hs-var">new_hash</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-624"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IO RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177489"><span class="hs-identifier hs-var">recomp</span></a></span><span>
</span><span id="line-625"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IO RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-626"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-627"></span><span>   </span><span id="local-6989586621681177489"><span class="annot"><span class="annottext">recomp :: RecompileRequired
</span><a href="#local-6989586621681177489"><span class="hs-identifier hs-var hs-var">recomp</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177496"><span class="hs-identifier hs-var">file</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; changed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-628"></span><span>   </span><span id="local-6989586621681177492"><span class="annot"><span class="annottext">handler :: p -&gt; IO RecompileRequired
</span><a href="#local-6989586621681177492"><span class="hs-identifier hs-var hs-var">handler</span></a></span></span><span> </span><span class="hs-glyph">=</span><span class="hs-cpp">
#if defined(DEBUG)
</span><span>       </span><span class="hs-glyph">\</span><span class="hs-identifier">e</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">pprTrace</span><span> </span><span class="hs-string">&quot;UsageFile&quot;</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">text</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">show</span><span> </span><span class="hs-identifier">e</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">return</span><span> </span><span class="hs-identifier">recomp</span><span class="hs-cpp">
#else
</span><span>       </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IO RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177489"><span class="hs-identifier hs-var">recomp</span></a></span><span> </span><span class="hs-comment">-- if we can't find the file, just recompile, don't fail</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-635"></span><span class="hs-comment">------------------------</span><span>
</span><span id="line-636"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkModuleFingerprint"><span class="hs-identifier hs-type">checkModuleFingerprint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span>
</span><span id="line-637"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-638"></span><span id="checkModuleFingerprint"><span class="annot"><span class="annottext">checkModuleFingerprint :: String -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkModuleFingerprint"><span class="hs-identifier hs-var hs-var">checkModuleFingerprint</span></a></span></span><span> </span><span id="local-6989586621681177487"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177487"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621681177486"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177486"><span class="hs-identifier hs-var">old_mod_hash</span></a></span></span><span> </span><span id="local-6989586621681177485"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177485"><span class="hs-identifier hs-var">new_mod_hash</span></a></span></span><span>
</span><span id="line-639"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177485"><span class="hs-identifier hs-var">new_mod_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177486"><span class="hs-identifier hs-var">old_mod_hash</span></a></span><span>
</span><span id="line-640"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var">up_to_date</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Module fingerprint unchanged&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-641"></span><span>
</span><span id="line-642"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-643"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-var">out_of_date_hash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177487"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  Module fingerprint has changed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-644"></span><span>                     </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177486"><span class="hs-identifier hs-var">old_mod_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177485"><span class="hs-identifier hs-var">new_mod_hash</span></a></span><span>
</span><span id="line-645"></span><span>
</span><span id="line-646"></span><span class="hs-comment">------------------------</span><span>
</span><span id="line-647"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkMaybeHash"><span class="hs-identifier hs-type">checkMaybeHash</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-648"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-649"></span><span id="checkMaybeHash"><span class="annot"><span class="annottext">checkMaybeHash :: String
-&gt; Maybe Fingerprint
-&gt; Fingerprint
-&gt; SDoc
-&gt; IfG RecompileRequired
-&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkMaybeHash"><span class="hs-identifier hs-var hs-var">checkMaybeHash</span></a></span></span><span> </span><span id="local-6989586621681177484"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177484"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621681177483"><span class="annot"><span class="annottext">Maybe Fingerprint
</span><a href="#local-6989586621681177483"><span class="hs-identifier hs-var">maybe_old_hash</span></a></span></span><span> </span><span id="local-6989586621681177482"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177482"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span> </span><span id="local-6989586621681177481"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177481"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681177480"><span class="annot"><span class="annottext">IfG RecompileRequired
</span><a href="#local-6989586621681177480"><span class="hs-identifier hs-var">continue</span></a></span></span><span>
</span><span id="line-650"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177479"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177479"><span class="hs-identifier hs-var">hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe Fingerprint
</span><a href="#local-6989586621681177483"><span class="hs-identifier hs-var">maybe_old_hash</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177479"><span class="hs-identifier hs-var">hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177482"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-651"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-var">out_of_date_hash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177484"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177481"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177479"><span class="hs-identifier hs-var">hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177482"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-652"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-653"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfG RecompileRequired
</span><a href="#local-6989586621681177480"><span class="hs-identifier hs-var">continue</span></a></span><span>
</span><span id="line-654"></span><span>
</span><span id="line-655"></span><span class="hs-comment">------------------------</span><span>
</span><span id="line-656"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkEntityUsage"><span class="hs-identifier hs-type">checkEntityUsage</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-657"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-658"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-659"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-660"></span><span id="checkEntityUsage"><span class="annot"><span class="annottext">checkEntityUsage :: String
-&gt; (OccName -&gt; Maybe (OccName, Fingerprint))
-&gt; (OccName, Fingerprint)
-&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkEntityUsage"><span class="hs-identifier hs-var hs-var">checkEntityUsage</span></a></span></span><span> </span><span id="local-6989586621681177478"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177478"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621681177477"><span class="annot"><span class="annottext">OccName -&gt; Maybe (OccName, Fingerprint)
</span><a href="#local-6989586621681177477"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177476"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177476"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681177475"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177475"><span class="hs-identifier hs-var">old_hash</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-661"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Maybe (OccName, Fingerprint)
</span><a href="#local-6989586621681177477"><span class="hs-identifier hs-var">new_hash</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177476"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-662"></span><span>
</span><span id="line-663"></span><span>        </span><span class="annot"><span class="annottext">Maybe (OccName, Fingerprint)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span>        </span><span class="hs-comment">-- We used it before, but it ain't there now</span><span>
</span><span id="line-664"></span><span>                          </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date"><span class="hs-identifier hs-var">out_of_date</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177478"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No longer exported:&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177476"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-665"></span><span>
</span><span id="line-666"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177473"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177473"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-comment">-- It's there, but is it up to date?</span><span>
</span><span id="line-667"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177473"><span class="hs-identifier hs-var">new_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177475"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  Up to date&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177476"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177473"><span class="hs-identifier hs-var">new_hash</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-668"></span><span>                                       </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-669"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-var">out_of_date_hash</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177478"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  Out of date:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177476"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-670"></span><span>                                                     </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177475"><span class="hs-identifier hs-var">old_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177473"><span class="hs-identifier hs-var">new_hash</span></a></span><span>
</span><span id="line-671"></span><span>
</span><span id="line-672"></span><span class="annot"><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-type">up_to_date</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-673"></span><span id="up_to_date"><span class="annot"><span class="annottext">up_to_date :: SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#up_to_date"><span class="hs-identifier hs-var hs-var">up_to_date</span></a></span></span><span>  </span><span id="local-6989586621681177471"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177471"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177471"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv ()) ()
-&gt; IfG RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-674"></span><span>
</span><span id="line-675"></span><span class="annot"><a href="GHC.Iface.Recomp.html#out_of_date"><span class="hs-identifier hs-type">out_of_date</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-676"></span><span id="out_of_date"><span class="annot"><span class="annottext">out_of_date :: String -&gt; SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date"><span class="hs-identifier hs-var hs-var">out_of_date</span></a></span></span><span> </span><span id="local-6989586621681177470"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177470"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621681177469"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177469"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env IfGblEnv ()) ()
forall m n. SDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceHiDiffs"><span class="hs-identifier hs-var">traceHiDiffs</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177469"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv ()) ()
-&gt; IfG RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RecompileRequired
</span><a href="GHC.Iface.Recomp.html#RecompBecause"><span class="hs-identifier hs-var">RecompBecause</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177470"><span class="hs-identifier hs-var">reason</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-677"></span><span>
</span><span id="line-678"></span><span class="annot"><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-type">out_of_date_hash</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-679"></span><span id="out_of_date_hash"><span class="annot"><span class="annottext">out_of_date_hash :: String
-&gt; SDoc -&gt; Fingerprint -&gt; Fingerprint -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date_hash"><span class="hs-identifier hs-var hs-var">out_of_date_hash</span></a></span></span><span> </span><span id="local-6989586621681177468"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177468"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621681177467"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177467"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span id="local-6989586621681177466"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177466"><span class="hs-identifier hs-var">old_hash</span></a></span></span><span> </span><span id="local-6989586621681177465"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177465"><span class="hs-identifier hs-var">new_hash</span></a></span></span><span>
</span><span id="line-680"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#out_of_date"><span class="hs-identifier hs-var">out_of_date</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681177468"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681177467"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177466"><span class="hs-identifier hs-var">old_hash</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&gt;&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177465"><span class="hs-identifier hs-var">new_hash</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-681"></span><span>
</span><span id="line-682"></span><span class="hs-comment">----------------------</span><span>
</span><span id="line-683"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-type">checkList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfG"><span class="hs-identifier hs-type">IfG</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#RecompileRequired"><span class="hs-identifier hs-type">RecompileRequired</span></a></span><span>
</span><span id="line-684"></span><span class="hs-comment">-- This helper is used in two places</span><span>
</span><span id="line-685"></span><span id="checkList"><span class="annot"><span class="annottext">checkList :: [IfG RecompileRequired] -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-var hs-var">checkList</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="GHC.Iface.Recomp.html#UpToDate"><span class="hs-identifier hs-var">UpToDate</span></a></span><span>
</span><span id="line-686"></span><span class="annot"><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-var">checkList</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177463"><span class="annot"><span class="annottext">IfG RecompileRequired
</span><a href="#local-6989586621681177463"><span class="hs-identifier hs-var">check</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681177462"><span class="annot"><span class="annottext">[IfG RecompileRequired]
</span><a href="#local-6989586621681177462"><span class="hs-identifier hs-var">checks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681177461"><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177461"><span class="hs-identifier hs-var">recompile</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IfG RecompileRequired
</span><a href="#local-6989586621681177463"><span class="hs-identifier hs-var">check</span></a></span><span>
</span><span id="line-687"></span><span>                              </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; Bool
</span><a href="GHC.Iface.Recomp.html#recompileRequired"><span class="hs-identifier hs-var">recompileRequired</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177461"><span class="hs-identifier hs-var">recompile</span></a></span><span>
</span><span id="line-688"></span><span>                                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">RecompileRequired -&gt; IfG RecompileRequired
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RecompileRequired
</span><a href="#local-6989586621681177461"><span class="hs-identifier hs-var">recompile</span></a></span><span>
</span><span id="line-689"></span><span>                                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[IfG RecompileRequired] -&gt; IfG RecompileRequired
</span><a href="GHC.Iface.Recomp.html#checkList"><span class="hs-identifier hs-var">checkList</span></a></span><span> </span><span class="annot"><span class="annottext">[IfG RecompileRequired]
</span><a href="#local-6989586621681177462"><span class="hs-identifier hs-var">checks</span></a></span><span>
</span><span id="line-690"></span><span>
</span><span id="line-691"></span><span>
</span><span id="line-692"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-693"></span><span class="hs-comment">-- Compute fingerprints for the interface</span><span>
</span><span id="line-694"></span><span>
</span><span id="line-695"></span><span class="hs-comment">{-
Note [Fingerprinting IfaceDecls]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The general idea here is that we first examine the 'IfaceDecl's and determine
the recursive groups of them. We then walk these groups in dependency order,
serializing each contained 'IfaceDecl' to a &quot;Binary&quot; buffer which we then
hash using MD5 to produce a fingerprint for the group.

However, the serialization that we use is a bit funny: we override the @putName@
operation with our own which serializes the hash of a 'Name' instead of the
'Name' itself. This ensures that the fingerprint of a decl changes if anything
in its transitive closure changes. This trick is why we must be careful about
traversing in dependency order: we need to ensure that we have hashes for
everything referenced by the decl which we are fingerprinting.

Moreover, we need to be careful to distinguish between serialization of binding
Names (e.g. the ifName field of a IfaceDecl) and non-binding (e.g. the ifInstCls
field of a IfaceClsInst): only in the non-binding case should we include the
fingerprint; in the binding case we shouldn't since it is merely the name of the
thing that we are currently fingerprinting.


Note [Fingerprinting recursive groups]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The fingerprinting of a single recursive group is a rather subtle affair, as
seen in #18733.

How not to fingerprint
----------------------

Prior to fixing #18733 we used the following (flawed) scheme to fingerprint a
group in hash environment `hash_env0`:

 1. extend hash_env0, giving each declaration in the group the fingerprint 0
 2. use this environment to hash the declarations' ABIs, resulting in
    group_fingerprint
 3. produce the final hash environment by extending hash_env0, mapping each
    declaration of the group to group_fingerprint

However, this is wrong. Consider, for instance, a program like:

    data A = ARecu B | ABase String deriving (Show)
    data B = BRecu A | BBase Int deriving (Show)

    info :: B
    info = BBase 1

A consequence of (3) is that A and B will have the same fingerprint. This means
that if the user changes `info` to:

    info :: A
    info = ABase &quot;hello&quot;

The program's ABI fingerprint will not change despite `info`'s type, and
therefore ABI, being clearly different.

However, the incorrectness doesn't end there: (1) means that all recursive
occurrences of names within the group will be given the same fingerprint. This
means that the group's fingerprint won't change if we change an occurrence of A
to B.

Surprisingly, this bug (#18733) lurked for many years before being uncovered.

How we now fingerprint
----------------------

As seen above, the fingerprinting function must ensure that a groups
fingerprint captures the structure of within-group occurrences. The scheme that
we use is:

 0. To ensure determinism, sort the declarations into a stable order by
    declaration name

 1. Extend hash_env0, giving each declaration in the group a sequential
    fingerprint (e.g. 0, 1, 2, ...).

 2. Use this environment to hash the declarations' ABIs, resulting in
    group_fingerprint.

    Since we included the sequence number in step (1) programs identical up to
    transposition of recursive occurrences are distinguisable, avoiding the
    second issue mentioned above.

 3. Produce the final environment by extending hash_env, mapping each
    declaration of the group to the hash of (group_fingerprint, i), where
    i is the position of the declaration in the stable ordering.

    Including i in the hash ensures that the first issue noted above is
    avoided.

-}</span><span>
</span><span id="line-788"></span><span>
</span><span id="line-789"></span><span class="hs-comment">-- | Add fingerprints for top-level declarations to a 'ModIface'.</span><span>
</span><span id="line-790"></span><span class="hs-comment">--</span><span>
</span><span id="line-791"></span><span class="hs-comment">-- See Note [Fingerprinting IfaceDecls]</span><span>
</span><span id="line-792"></span><span class="annot"><a href="GHC.Iface.Recomp.html#addFingerprints"><span class="hs-identifier hs-type">addFingerprints</span></a></span><span>
</span><span id="line-793"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-794"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#PartialModIface"><span class="hs-identifier hs-type">PartialModIface</span></a></span><span>
</span><span id="line-795"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-796"></span><span id="addFingerprints"><span class="annot"><span class="annottext">addFingerprints :: HscEnv -&gt; PartialModIface -&gt; IO ModIface
</span><a href="GHC.Iface.Recomp.html#addFingerprints"><span class="hs-identifier hs-var hs-var">addFingerprints</span></a></span></span><span> </span><span id="local-6989586621681177460"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177460"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177459"><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span></span><span>
</span><span id="line-797"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-798"></span><span>   </span><span id="local-6989586621681177458"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177458"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; IO ExternalPackageState
</span><a href="GHC.Driver.Types.html#hscEPS"><span class="hs-identifier hs-var">hscEPS</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177460"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-799"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-800"></span><span>       </span><span id="local-6989586621681177456"><span class="annot"><span class="annottext">decls :: [IfaceDeclExts 'ModIfaceCore]
</span><a href="#local-6989586621681177456"><span class="hs-identifier hs-var hs-var">decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceDeclExts 'ModIfaceCore]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceDeclExts phase]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var hs-var">mi_decls</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span>
</span><span id="line-801"></span><span>       </span><span id="local-6989586621681177454"><span class="annot"><span class="annottext">warn_fn :: OccName -&gt; Maybe WarningTxt
</span><a href="#local-6989586621681177454"><span class="hs-identifier hs-var hs-var">warn_fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Warnings -&gt; OccName -&gt; Maybe WarningTxt
</span><a href="GHC.Driver.Types.html#mkIfaceWarnCache"><span class="hs-identifier hs-var">mkIfaceWarnCache</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; Warnings
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Warnings
</span><a href="GHC.Driver.Types.html#mi_warns"><span class="hs-identifier hs-var hs-var">mi_warns</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-802"></span><span>       </span><span id="local-6989586621681177451"><span class="annot"><span class="annottext">fix_fn :: OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177451"><span class="hs-identifier hs-var hs-var">fix_fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(OccName, Fixity)] -&gt; OccName -&gt; Maybe Fixity
</span><a href="GHC.Driver.Types.html#mkIfaceFixCache"><span class="hs-identifier hs-var">mkIfaceFixCache</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [(OccName, Fixity)]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [(OccName, Fixity)]
</span><a href="GHC.Driver.Types.html#mi_fixities"><span class="hs-identifier hs-var hs-var">mi_fixities</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-803"></span><span>
</span><span id="line-804"></span><span>        </span><span class="hs-comment">-- The ABI of a declaration represents everything that is made</span><span>
</span><span id="line-805"></span><span>        </span><span class="hs-comment">-- visible about the declaration that a client can depend on.</span><span>
</span><span id="line-806"></span><span>        </span><span class="hs-comment">-- see IfaceDeclABI below.</span><span>
</span><span id="line-807"></span><span>       </span><span class="annot"><a href="#local-6989586621681177448"><span class="hs-identifier hs-type">declABI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span>
</span><span id="line-808"></span><span>       </span><span class="hs-comment">-- TODO: I'm not sure if this should be semantic_mod or this_mod.</span><span>
</span><span id="line-809"></span><span>       </span><span class="hs-comment">-- See also Note [Identity versus semantic module]</span><span>
</span><span id="line-810"></span><span>       </span><span id="local-6989586621681177448"><span class="annot"><span class="annottext">declABI :: IfaceDecl -&gt; IfaceDeclABI
</span><a href="#local-6989586621681177448"><span class="hs-identifier hs-var hs-var">declABI</span></a></span></span><span> </span><span id="local-6989586621681177447"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177447"><span class="hs-identifier hs-var">decl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177446"><span class="hs-identifier hs-var">this_mod</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177447"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras
</span><a href="#local-6989586621681177445"><span class="hs-identifier hs-var">extras</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-811"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681177445"><span class="annot"><span class="annottext">extras :: IfaceDeclExtras
</span><a href="#local-6989586621681177445"><span class="hs-identifier hs-var hs-var">extras</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; Maybe Fixity)
-&gt; (OccName -&gt; [AnnPayload])
-&gt; OccEnv [IfaceRule]
-&gt; OccEnv [IfaceClsInst]
-&gt; OccEnv [IfaceFamInst]
-&gt; OccEnv IfaceTopBndr
-&gt; IfaceDecl
-&gt; IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#declExtras"><span class="hs-identifier hs-var">declExtras</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177451"><span class="hs-identifier hs-var">fix_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177443"><span class="hs-identifier hs-var">ann_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceRule]
</span><a href="#local-6989586621681177442"><span class="hs-identifier hs-var">non_orph_rules</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceClsInst]
</span><a href="#local-6989586621681177441"><span class="hs-identifier hs-var">non_orph_insts</span></a></span><span>
</span><span id="line-812"></span><span>                                  </span><span class="annot"><span class="annottext">OccEnv [IfaceFamInst]
</span><a href="#local-6989586621681177440"><span class="hs-identifier hs-var">non_orph_fis</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv IfaceTopBndr
</span><a href="#local-6989586621681177439"><span class="hs-identifier hs-var">top_lvl_name_env</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177447"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-813"></span><span>
</span><span id="line-814"></span><span>       </span><span class="hs-comment">-- This is used for looking up the Name of a default method</span><span>
</span><span id="line-815"></span><span>       </span><span class="hs-comment">-- from its OccName. See Note [default method Name]</span><span>
</span><span id="line-816"></span><span>       </span><span id="local-6989586621681177439"><span class="annot"><span class="annottext">top_lvl_name_env :: OccEnv IfaceTopBndr
</span><a href="#local-6989586621681177439"><span class="hs-identifier hs-var hs-var">top_lvl_name_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-817"></span><span>         </span><span class="annot"><span class="annottext">[(OccName, IfaceTopBndr)] -&gt; OccEnv IfaceTopBndr
forall a. [(OccName, a)] -&gt; OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#mkOccEnv"><span class="hs-identifier hs-var">mkOccEnv</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177436"><span class="hs-identifier hs-var">nm</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177436"><span class="hs-identifier hs-var">nm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-818"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceId"><span class="hs-identifier hs-type">IfaceId</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: IfaceDecl -&gt; IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681177436"><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177436"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681177456"><span class="hs-identifier hs-var">decls</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-819"></span><span>
</span><span id="line-820"></span><span>       </span><span class="hs-comment">-- Dependency edges between declarations in the current module.</span><span>
</span><span id="line-821"></span><span>       </span><span class="hs-comment">-- This is computed by finding the free external names of each</span><span>
</span><span id="line-822"></span><span>       </span><span class="hs-comment">-- declaration, including IfaceDeclExtras (things that a</span><span>
</span><span id="line-823"></span><span>       </span><span class="hs-comment">-- declaration implicitly depends on).</span><span>
</span><span id="line-824"></span><span>       </span><span class="annot"><a href="#local-6989586621681177433"><span class="hs-identifier hs-type">edges</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Directed.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-825"></span><span>       </span><span id="local-6989586621681177433"><span class="annot"><span class="annottext">edges :: [Node Unique IfaceDeclABI]
</span><a href="#local-6989586621681177433"><span class="hs-identifier hs-var hs-var">edges</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI -&gt; Unique -&gt; [Unique] -&gt; Node Unique IfaceDeclABI
forall key payload. payload -&gt; key -&gt; [key] -&gt; Node key payload
</span><a href="GHC.Data.Graph.Directed.html#DigraphNode"><span class="hs-identifier hs-var">DigraphNode</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177431"><span class="hs-identifier hs-var">abi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDecl -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177428"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Unique]
</span><a href="#local-6989586621681177427"><span class="hs-identifier hs-var">out</span></a></span><span>
</span><span id="line-826"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681177428"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177428"><span class="hs-identifier hs-var">decl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681177456"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-827"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177431"><span class="annot"><span class="annottext">abi :: IfaceDeclABI
</span><a href="#local-6989586621681177431"><span class="hs-identifier hs-var hs-var">abi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; IfaceDeclABI
</span><a href="#local-6989586621681177448"><span class="hs-identifier hs-var">declABI</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177428"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-828"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177427"><span class="annot"><span class="annottext">out :: [Unique]
</span><a href="#local-6989586621681177427"><span class="hs-identifier hs-var hs-var">out</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr -&gt; [Unique]
</span><a href="#local-6989586621681177426"><span class="hs-identifier hs-var">localOccs</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqSet IfaceTopBndr -&gt; [Unique])
-&gt; UniqSet IfaceTopBndr -&gt; [Unique]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesDeclABI"><span class="hs-identifier hs-var">freeNamesDeclABI</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177431"><span class="hs-identifier hs-var">abi</span></a></span><span>
</span><span id="line-829"></span><span>               </span><span class="hs-special">]</span><span>
</span><span id="line-830"></span><span>
</span><span id="line-831"></span><span>       </span><span id="local-6989586621681177419"><span class="annot"><span class="annottext">name_module :: IfaceTopBndr -&gt; Module
</span><a href="#local-6989586621681177419"><span class="hs-identifier hs-var hs-var">name_module</span></a></span></span><span> </span><span id="local-6989586621681177418"><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177418"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">n</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">n</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">nameModule</span><span> </span><span class="hs-identifier">n</span><span>
</span><span id="line-832"></span><span>       </span><span id="local-6989586621681177426"><span class="annot"><span class="annottext">localOccs :: UniqSet IfaceTopBndr -&gt; [Unique]
</span><a href="#local-6989586621681177426"><span class="hs-identifier hs-var hs-var">localOccs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-833"></span><span>         </span><span class="annot"><span class="annottext">(IfaceTopBndr -&gt; Unique) -&gt; [IfaceTopBndr] -&gt; [Unique]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; Unique)
-&gt; (IfaceTopBndr -&gt; OccName) -&gt; IfaceTopBndr -&gt; Unique
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccName
</span><a href="#local-6989586621681177409"><span class="hs-identifier hs-var">getParent</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; OccName)
-&gt; (IfaceTopBndr -&gt; OccName) -&gt; IfaceTopBndr -&gt; OccName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-834"></span><span>                        </span><span class="hs-comment">-- NB: names always use semantic module, so</span><span>
</span><span id="line-835"></span><span>                        </span><span class="hs-comment">-- filtering must be on the semantic module!</span><span>
</span><span id="line-836"></span><span>                        </span><span class="hs-comment">-- See Note [Identity versus semantic module]</span><span>
</span><span id="line-837"></span><span>                        </span><span class="annot"><span class="annottext">([IfaceTopBndr] -&gt; [Unique])
-&gt; (UniqSet IfaceTopBndr -&gt; [IfaceTopBndr])
-&gt; UniqSet IfaceTopBndr
-&gt; [Unique]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(IfaceTopBndr -&gt; Bool) -&gt; [IfaceTopBndr] -&gt; [IfaceTopBndr]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177408"><span class="hs-identifier hs-var">semantic_mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Module -&gt; Bool)
-&gt; (IfaceTopBndr -&gt; Module) -&gt; IfaceTopBndr -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; Module
</span><a href="#local-6989586621681177419"><span class="hs-identifier hs-var">name_module</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-838"></span><span>                        </span><span class="annot"><span class="annottext">([IfaceTopBndr] -&gt; [IfaceTopBndr])
-&gt; (UniqSet IfaceTopBndr -&gt; [IfaceTopBndr])
-&gt; UniqSet IfaceTopBndr
-&gt; [IfaceTopBndr]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr -&gt; [IfaceTopBndr]
forall elt. UniqSet elt -&gt; [elt]
</span><a href="GHC.Types.Unique.Set.html#nonDetEltsUniqSet"><span class="hs-identifier hs-var">nonDetEltsUniqSet</span></a></span><span>
</span><span id="line-839"></span><span>                   </span><span class="hs-comment">-- It's OK to use nonDetEltsUFM as localOccs is only</span><span>
</span><span id="line-840"></span><span>                   </span><span class="hs-comment">-- used to construct the edges and</span><span>
</span><span id="line-841"></span><span>                   </span><span class="hs-comment">-- stronglyConnCompFromEdgedVertices is deterministic</span><span>
</span><span id="line-842"></span><span>                   </span><span class="hs-comment">-- even with non-deterministic order of edges as</span><span>
</span><span id="line-843"></span><span>                   </span><span class="hs-comment">-- explained in Note [Deterministic SCC] in GHC.Data.Graph.Directed.</span><span>
</span><span id="line-844"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621681177409"><span class="hs-identifier hs-type">getParent</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span>
</span><span id="line-845"></span><span>                </span><span id="local-6989586621681177409"><span class="annot"><span class="annottext">getParent :: OccName -&gt; OccName
</span><a href="#local-6989586621681177409"><span class="hs-identifier hs-var hs-var">getParent</span></a></span></span><span> </span><span id="local-6989586621681177406"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177406"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccEnv OccName -&gt; OccName -&gt; Maybe OccName
forall a. OccEnv a -&gt; OccName -&gt; Maybe a
</span><a href="GHC.Types.Name.Occurrence.html#lookupOccEnv"><span class="hs-identifier hs-var">lookupOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv OccName
</span><a href="#local-6989586621681177404"><span class="hs-identifier hs-var">parent_map</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177406"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe OccName -&gt; OccName -&gt; OccName
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177406"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-846"></span><span>
</span><span id="line-847"></span><span>        </span><span class="hs-comment">-- maps OccNames to their parents in the current module.</span><span>
</span><span id="line-848"></span><span>        </span><span class="hs-comment">-- e.g. a reference to a constructor must be turned into a reference</span><span>
</span><span id="line-849"></span><span>        </span><span class="hs-comment">-- to the TyCon for the purposes of calculating dependencies.</span><span>
</span><span id="line-850"></span><span>       </span><span class="annot"><a href="#local-6989586621681177404"><span class="hs-identifier hs-type">parent_map</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span>
</span><span id="line-851"></span><span>       </span><span id="local-6989586621681177404"><span class="annot"><span class="annottext">parent_map :: OccEnv OccName
</span><a href="#local-6989586621681177404"><span class="hs-identifier hs-var hs-var">parent_map</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(OccEnv OccName -&gt; IfaceDecl -&gt; OccEnv OccName)
-&gt; OccEnv OccName -&gt; [IfaceDecl] -&gt; OccEnv OccName
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv OccName -&gt; IfaceDecl -&gt; OccEnv OccName
</span><a href="#local-6989586621681177401"><span class="hs-identifier hs-var">extend</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv OccName
forall a. OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#emptyOccEnv"><span class="hs-identifier hs-var">emptyOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681177456"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-852"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681177401"><span class="annot"><span class="annottext">extend :: OccEnv OccName -&gt; IfaceDecl -&gt; OccEnv OccName
</span><a href="#local-6989586621681177401"><span class="hs-identifier hs-var hs-var">extend</span></a></span></span><span> </span><span id="local-6989586621681177399"><span class="annot"><span class="annottext">OccEnv OccName
</span><a href="#local-6989586621681177399"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681177398"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177398"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-853"></span><span>                  </span><span class="annot"><span class="annottext">OccEnv OccName -&gt; [(OccName, OccName)] -&gt; OccEnv OccName
forall a. OccEnv a -&gt; [(OccName, a)] -&gt; OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#extendOccEnvList"><span class="hs-identifier hs-var">extendOccEnvList</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv OccName
</span><a href="#local-6989586621681177399"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177396"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177395"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681177396"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177396"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; [OccName]
</span><a href="GHC.Iface.Syntax.html#ifaceDeclImplicitBndrs"><span class="hs-identifier hs-var">ifaceDeclImplicitBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177398"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-854"></span><span>                  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681177395"><span class="annot"><span class="annottext">n :: OccName
</span><a href="#local-6989586621681177395"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177398"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-855"></span><span>
</span><span id="line-856"></span><span>        </span><span class="hs-comment">-- Strongly-connected groups of declarations, in dependency order</span><span>
</span><span id="line-857"></span><span>       </span><span class="annot"><a href="#local-6989586621681177392"><span class="hs-identifier hs-type">groups</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-858"></span><span>       </span><span id="local-6989586621681177392"><span class="annot"><span class="annottext">groups :: [SCC IfaceDeclABI]
</span><a href="#local-6989586621681177392"><span class="hs-identifier hs-var hs-var">groups</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Node Unique IfaceDeclABI] -&gt; [SCC IfaceDeclABI]
forall key payload.
Uniquable key =&gt;
[Node key payload] -&gt; [SCC payload]
</span><a href="GHC.Data.Graph.Directed.html#stronglyConnCompFromEdgedVerticesUniq"><span class="hs-identifier hs-var">stronglyConnCompFromEdgedVerticesUniq</span></a></span><span> </span><span class="annot"><span class="annottext">[Node Unique IfaceDeclABI]
</span><a href="#local-6989586621681177433"><span class="hs-identifier hs-var">edges</span></a></span><span>
</span><span id="line-859"></span><span>
</span><span id="line-860"></span><span>       </span><span id="local-6989586621681177390"><span class="annot"><span class="annottext">global_hash_fn :: IfaceTopBndr -&gt; IO Fingerprint
</span><a href="#local-6989586621681177390"><span class="hs-identifier hs-var hs-var">global_hash_fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ExternalPackageState -&gt; IfaceTopBndr -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.html#mkHashFun"><span class="hs-identifier hs-var">mkHashFun</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177460"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177458"><span class="hs-identifier hs-var">eps</span></a></span><span>
</span><span id="line-861"></span><span>
</span><span id="line-862"></span><span>        </span><span class="hs-comment">-- How to output Names when generating the data to fingerprint.</span><span>
</span><span id="line-863"></span><span>        </span><span class="hs-comment">-- Here we want to output the fingerprint for each top-level</span><span>
</span><span id="line-864"></span><span>        </span><span class="hs-comment">-- Name, whether it comes from the current module or another</span><span>
</span><span id="line-865"></span><span>        </span><span class="hs-comment">-- module.  In this way, the fingerprint for a declaration will</span><span>
</span><span id="line-866"></span><span>        </span><span class="hs-comment">-- change if the fingerprint for anything it refers to (transitively)</span><span>
</span><span id="line-867"></span><span>        </span><span class="hs-comment">-- changes.</span><span>
</span><span id="line-868"></span><span>       </span><span class="annot"><a href="#local-6989586621681177388"><span class="hs-identifier hs-type">mk_put_name</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-869"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html#BinHandle"><span class="hs-identifier hs-type">BinHandle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-870"></span><span>       </span><span id="local-6989586621681177388"><span class="annot"><span class="annottext">mk_put_name :: OccEnv (OccName, Fingerprint) -&gt; BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177388"><span class="hs-identifier hs-var hs-var">mk_put_name</span></a></span></span><span> </span><span id="local-6989586621681177386"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177386"><span class="hs-identifier hs-var">local_env</span></a></span></span><span> </span><span id="local-6989586621681177385"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177385"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span id="local-6989586621681177384"><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-871"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; Bool
</span><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier hs-var">isWiredInName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177385"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-872"></span><span>           </span><span class="hs-comment">-- wired-in names don't have fingerprints</span><span>
</span><span id="line-873"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-874"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">name</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-875"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177367"><span class="annot"><span class="annottext">hash :: IO Fingerprint
</span><a href="#local-6989586621681177367"><span class="hs-identifier hs-var hs-var">hash</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IfaceTopBndr -&gt; Module
IfaceTopBndr -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177408"><span class="hs-identifier hs-var">semantic_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; IO Fingerprint
</span><a href="#local-6989586621681177390"><span class="hs-identifier hs-var">global_hash_fn</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-876"></span><span>                     </span><span class="hs-comment">-- Get it from the REAL interface!!</span><span>
</span><span id="line-877"></span><span>                     </span><span class="hs-comment">-- This will trigger when we compile an hsig file</span><span>
</span><span id="line-878"></span><span>                     </span><span class="hs-comment">-- and we know a backing impl for it.</span><span>
</span><span id="line-879"></span><span>                     </span><span class="hs-comment">-- See Note [Identity versus semantic module]</span><span>
</span><span id="line-880"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177408"><span class="hs-identifier hs-var">semantic_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177446"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-881"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; Bool
forall u. GenModule (GenUnit u) -&gt; Bool
</span><a href="GHC.Unit.Module.html#isHoleModule"><span class="hs-identifier hs-var">isHoleModule</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177408"><span class="hs-identifier hs-var">semantic_mod</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; IO Fingerprint
</span><a href="#local-6989586621681177390"><span class="hs-identifier hs-var">global_hash_fn</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-882"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; IO Fingerprint
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(OccName, Fingerprint) -&gt; Fingerprint
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
-&gt; OccName -&gt; Maybe (OccName, Fingerprint)
forall a. OccEnv a -&gt; OccName -&gt; Maybe a
</span><a href="GHC.Types.Name.Occurrence.html#lookupOccEnv"><span class="hs-identifier hs-var">lookupOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177386"><span class="hs-identifier hs-var">local_env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-883"></span><span>                           </span><span class="annot"><span class="annottext">Maybe (OccName, Fingerprint)
-&gt; (OccName, Fingerprint) -&gt; (OccName, Fingerprint)
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; (OccName, Fingerprint)
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;urk! lookup local fingerprint&quot;</span></span><span>
</span><span id="line-884"></span><span>                                       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177384"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177386"><span class="hs-identifier hs-var">local_env</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-885"></span><span>                </span><span class="hs-comment">-- This panic indicates that we got the dependency</span><span>
</span><span id="line-886"></span><span>                </span><span class="hs-comment">-- analysis wrong, because we needed a fingerprint for</span><span>
</span><span id="line-887"></span><span>                </span><span class="hs-comment">-- an entity that wasn't in the environment.  To debug</span><span>
</span><span id="line-888"></span><span>                </span><span class="hs-comment">-- it, turn the panic into a trace, uncomment the</span><span>
</span><span id="line-889"></span><span>                </span><span class="hs-comment">-- pprTraces below, run the compile again, and inspect</span><span>
</span><span id="line-890"></span><span>                </span><span class="hs-comment">-- the output and the generated .hi file with</span><span>
</span><span id="line-891"></span><span>                </span><span class="hs-comment">-- --show-iface.</span><span>
</span><span id="line-892"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">IO Fingerprint
</span><a href="#local-6989586621681177367"><span class="hs-identifier hs-var">hash</span></a></span><span> </span><span class="annot"><span class="annottext">IO Fingerprint -&gt; (Fingerprint -&gt; IO ()) -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Fingerprint -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177385"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-893"></span><span>
</span><span id="line-894"></span><span>        </span><span class="hs-comment">-- take a strongly-connected group of declarations and compute</span><span>
</span><span id="line-895"></span><span>        </span><span class="hs-comment">-- its fingerprint.</span><span>
</span><span id="line-896"></span><span>
</span><span id="line-897"></span><span>       </span><span class="annot"><a href="#local-6989586621681177363"><span class="hs-identifier hs-type">fingerprint_group</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-898"></span><span>                             </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-899"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span>
</span><span id="line-900"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-901"></span><span>                                </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-902"></span><span>
</span><span id="line-903"></span><span>       </span><span id="local-6989586621681177363"><span class="annot"><span class="annottext">fingerprint_group :: (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
-&gt; SCC IfaceDeclABI
-&gt; IO (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
</span><a href="#local-6989586621681177363"><span class="hs-identifier hs-var hs-var">fingerprint_group</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177362"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177362"><span class="hs-identifier hs-var">local_env</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177361"><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177361"><span class="hs-identifier hs-var">decls_w_hashes</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-type">AcyclicSCC</span></a></span><span> </span><span id="local-6989586621681177359"><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177359"><span class="hs-identifier hs-var">abi</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-904"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177358"><span class="annot"><span class="annottext">hash_fn :: BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177358"><span class="hs-identifier hs-var hs-var">hash_fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint) -&gt; BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177388"><span class="hs-identifier hs-var">mk_put_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177362"><span class="hs-identifier hs-var">local_env</span></a></span><span>
</span><span id="line-905"></span><span>                   </span><span id="local-6989586621681177357"><span class="annot"><span class="annottext">decl :: IfaceDecl
</span><a href="#local-6989586621681177357"><span class="hs-identifier hs-var hs-var">decl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI -&gt; IfaceDecl
</span><a href="GHC.Iface.Recomp.html#abiDecl"><span class="hs-identifier hs-var">abiDecl</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177359"><span class="hs-identifier hs-var">abi</span></a></span><span>
</span><span id="line-906"></span><span>               </span><span class="hs-comment">--pprTrace &quot;fingerprinting&quot; (ppr (ifName decl) ) $ do</span><span>
</span><span id="line-907"></span><span>               </span><span id="local-6989586621681177355"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177355"><span class="hs-identifier hs-var">hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(BinHandle -&gt; IfaceTopBndr -&gt; IO ())
-&gt; IfaceDeclABI -&gt; IO Fingerprint
forall a.
Binary a =&gt;
(BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; a -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Binary.html#computeFingerprint"><span class="hs-identifier hs-var">computeFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177358"><span class="hs-identifier hs-var">hash_fn</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177359"><span class="hs-identifier hs-var">abi</span></a></span><span>
</span><span id="line-908"></span><span>               </span><span id="local-6989586621681177353"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177353"><span class="hs-identifier hs-var">env'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
-&gt; (Fingerprint, IfaceDecl) -&gt; IO (OccEnv (OccName, Fingerprint))
</span><a href="#local-6989586621681177352"><span class="hs-identifier hs-var">extend_hash_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177362"><span class="hs-identifier hs-var">local_env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177355"><span class="hs-identifier hs-var">hash</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177357"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-909"></span><span>               </span><span class="annot"><span class="annottext">(OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
-&gt; IO (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177353"><span class="hs-identifier hs-var">env'</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177355"><span class="hs-identifier hs-var">hash</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177357"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Fingerprint, IfaceDecl)
-&gt; [(Fingerprint, IfaceDecl)] -&gt; [(Fingerprint, IfaceDecl)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177361"><span class="hs-identifier hs-var">decls_w_hashes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-910"></span><span>
</span><span id="line-911"></span><span>       </span><span class="annot"><a href="#local-6989586621681177363"><span class="hs-identifier hs-var">fingerprint_group</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177351"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177351"><span class="hs-identifier hs-var">local_env</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177350"><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177350"><span class="hs-identifier hs-var">decls_w_hashes</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-type">CyclicSCC</span></a></span><span> </span><span id="local-6989586621681177348"><span class="annot"><span class="annottext">[IfaceDeclABI]
</span><a href="#local-6989586621681177348"><span class="hs-identifier hs-var">abis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-912"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177347"><span class="annot"><span class="annottext">stable_abis :: [IfaceDeclABI]
</span><a href="#local-6989586621681177347"><span class="hs-identifier hs-var hs-var">stable_abis</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceDeclABI -&gt; IfaceDeclABI -&gt; Ordering)
-&gt; [IfaceDeclABI] -&gt; [IfaceDeclABI]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI -&gt; IfaceDeclABI -&gt; Ordering
</span><a href="GHC.Iface.Recomp.html#cmp_abiNames"><span class="hs-identifier hs-var">cmp_abiNames</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceDeclABI]
</span><a href="#local-6989586621681177348"><span class="hs-identifier hs-var">abis</span></a></span><span>
</span><span id="line-913"></span><span>                   </span><span id="local-6989586621681177345"><span class="annot"><span class="annottext">stable_decls :: [IfaceDecl]
</span><a href="#local-6989586621681177345"><span class="hs-identifier hs-var hs-var">stable_decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceDeclABI -&gt; IfaceDecl) -&gt; [IfaceDeclABI] -&gt; [IfaceDecl]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI -&gt; IfaceDecl
</span><a href="GHC.Iface.Recomp.html#abiDecl"><span class="hs-identifier hs-var">abiDecl</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceDeclABI]
</span><a href="#local-6989586621681177347"><span class="hs-identifier hs-var">stable_abis</span></a></span><span>
</span><span id="line-914"></span><span>               </span><span id="local-6989586621681177344"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177344"><span class="hs-identifier hs-var">local_env1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(OccEnv (OccName, Fingerprint)
 -&gt; (Fingerprint, IfaceDecl) -&gt; IO (OccEnv (OccName, Fingerprint)))
-&gt; OccEnv (OccName, Fingerprint)
-&gt; [(Fingerprint, IfaceDecl)]
-&gt; IO (OccEnv (OccName, Fingerprint))
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Control.Monad.html#foldM"><span class="hs-identifier hs-var">foldM</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
-&gt; (Fingerprint, IfaceDecl) -&gt; IO (OccEnv (OccName, Fingerprint))
</span><a href="#local-6989586621681177352"><span class="hs-identifier hs-var">extend_hash_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177351"><span class="hs-identifier hs-var">local_env</span></a></span><span>
</span><span id="line-915"></span><span>                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Fingerprint] -&gt; [IfaceDecl] -&gt; [(Fingerprint, IfaceDecl)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Word64 -&gt; Fingerprint) -&gt; [Word64] -&gt; [Fingerprint]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Fingerprint
</span><a href="#local-6989586621681177342"><span class="hs-identifier hs-var">mkRecFingerprint</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681177345"><span class="hs-identifier hs-var">stable_decls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-916"></span><span>                </span><span class="hs-comment">-- See Note [Fingerprinting recursive groups]</span><span>
</span><span id="line-917"></span><span>               </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177341"><span class="annot"><span class="annottext">hash_fn :: BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177341"><span class="hs-identifier hs-var hs-var">hash_fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint) -&gt; BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177388"><span class="hs-identifier hs-var">mk_put_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177344"><span class="hs-identifier hs-var">local_env1</span></a></span><span>
</span><span id="line-918"></span><span>               </span><span class="hs-comment">-- pprTrace &quot;fingerprinting&quot; (ppr (map ifName decls) ) $ do</span><span>
</span><span id="line-919"></span><span>                </span><span class="hs-comment">-- put the cycle in a canonical order</span><span>
</span><span id="line-920"></span><span>               </span><span id="local-6989586621681177340"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177340"><span class="hs-identifier hs-var">hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(BinHandle -&gt; IfaceTopBndr -&gt; IO ())
-&gt; [IfaceDeclABI] -&gt; IO Fingerprint
forall a.
Binary a =&gt;
(BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; a -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Binary.html#computeFingerprint"><span class="hs-identifier hs-var">computeFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177341"><span class="hs-identifier hs-var">hash_fn</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceDeclABI]
</span><a href="#local-6989586621681177347"><span class="hs-identifier hs-var">stable_abis</span></a></span><span>
</span><span id="line-921"></span><span>               </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177337"><span class="annot"><span class="annottext">pairs :: [(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177337"><span class="hs-identifier hs-var hs-var">pairs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Fingerprint] -&gt; [IfaceDecl] -&gt; [(Fingerprint, IfaceDecl)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Word64 -&gt; Fingerprint) -&gt; [Word64] -&gt; [Fingerprint]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint -&gt; Word64 -&gt; Fingerprint
</span><a href="#local-6989586621681177336"><span class="hs-identifier hs-var">bumpFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177340"><span class="hs-identifier hs-var">hash</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681177345"><span class="hs-identifier hs-var">stable_decls</span></a></span><span>
</span><span id="line-922"></span><span>                </span><span class="hs-comment">-- See Note [Fingerprinting recursive groups]</span><span>
</span><span id="line-923"></span><span>               </span><span id="local-6989586621681177335"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177335"><span class="hs-identifier hs-var">local_env2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(OccEnv (OccName, Fingerprint)
 -&gt; (Fingerprint, IfaceDecl) -&gt; IO (OccEnv (OccName, Fingerprint)))
-&gt; OccEnv (OccName, Fingerprint)
-&gt; [(Fingerprint, IfaceDecl)]
-&gt; IO (OccEnv (OccName, Fingerprint))
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Control.Monad.html#foldM"><span class="hs-identifier hs-var">foldM</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
-&gt; (Fingerprint, IfaceDecl) -&gt; IO (OccEnv (OccName, Fingerprint))
</span><a href="#local-6989586621681177352"><span class="hs-identifier hs-var">extend_hash_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177351"><span class="hs-identifier hs-var">local_env</span></a></span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177337"><span class="hs-identifier hs-var">pairs</span></a></span><span>
</span><span id="line-924"></span><span>               </span><span class="annot"><span class="annottext">(OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
-&gt; IO (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177335"><span class="hs-identifier hs-var">local_env2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177337"><span class="hs-identifier hs-var">pairs</span></a></span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
-&gt; [(Fingerprint, IfaceDecl)] -&gt; [(Fingerprint, IfaceDecl)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177350"><span class="hs-identifier hs-var">decls_w_hashes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-925"></span><span>
</span><span id="line-926"></span><span>       </span><span class="hs-comment">-- Make a fingerprint from the ordinal position of a binding in its group.</span><span>
</span><span id="line-927"></span><span>       </span><span class="annot"><a href="#local-6989586621681177342"><span class="hs-identifier hs-type">mkRecFingerprint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span>
</span><span id="line-928"></span><span>       </span><span id="local-6989586621681177342"><span class="annot"><span class="annottext">mkRecFingerprint :: Word64 -&gt; Fingerprint
</span><a href="#local-6989586621681177342"><span class="hs-identifier hs-var hs-var">mkRecFingerprint</span></a></span></span><span> </span><span id="local-6989586621681177334"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621681177334"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64 -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-var">Fingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621681177334"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-929"></span><span>
</span><span id="line-930"></span><span>       </span><span class="annot"><a href="#local-6989586621681177336"><span class="hs-identifier hs-type">bumpFingerprint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span>
</span><span id="line-931"></span><span>       </span><span id="local-6989586621681177336"><span class="annot"><span class="annottext">bumpFingerprint :: Fingerprint -&gt; Word64 -&gt; Fingerprint
</span><a href="#local-6989586621681177336"><span class="hs-identifier hs-var hs-var">bumpFingerprint</span></a></span></span><span> </span><span id="local-6989586621681177333"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177333"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span id="local-6989586621681177332"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621681177332"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Fingerprint] -&gt; Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprintFingerprints"><span class="hs-identifier hs-var">fingerprintFingerprints</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177333"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Fingerprint
</span><a href="#local-6989586621681177342"><span class="hs-identifier hs-var">mkRecFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621681177332"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-932"></span><span>
</span><span id="line-933"></span><span>       </span><span class="hs-comment">-- we have fingerprinted the whole declaration, but we now need</span><span>
</span><span id="line-934"></span><span>       </span><span class="hs-comment">-- to assign fingerprints to all the OccNames that it binds, to</span><span>
</span><span id="line-935"></span><span>       </span><span class="hs-comment">-- use when referencing those OccNames in later declarations.</span><span>
</span><span id="line-936"></span><span>       </span><span class="hs-comment">--</span><span>
</span><span id="line-937"></span><span>       </span><span class="annot"><a href="#local-6989586621681177352"><span class="hs-identifier hs-type">extend_hash_env</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-938"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-939"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-940"></span><span>       </span><span id="local-6989586621681177352"><span class="annot"><span class="annottext">extend_hash_env :: OccEnv (OccName, Fingerprint)
-&gt; (Fingerprint, IfaceDecl) -&gt; IO (OccEnv (OccName, Fingerprint))
</span><a href="#local-6989586621681177352"><span class="hs-identifier hs-var hs-var">extend_hash_env</span></a></span></span><span> </span><span id="local-6989586621681177330"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177330"><span class="hs-identifier hs-var">env0</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177329"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177329"><span class="hs-identifier hs-var">hash</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681177328"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177328"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-941"></span><span>          </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint) -&gt; IO (OccEnv (OccName, Fingerprint))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((OccName, Fingerprint)
 -&gt; OccEnv (OccName, Fingerprint) -&gt; OccEnv (OccName, Fingerprint))
-&gt; OccEnv (OccName, Fingerprint)
-&gt; [(OccName, Fingerprint)]
-&gt; OccEnv (OccName, Fingerprint)
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681177326"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177326"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681177325"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177325"><span class="hs-identifier hs-var">fp</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681177324"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177324"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
-&gt; OccName
-&gt; (OccName, Fingerprint)
-&gt; OccEnv (OccName, Fingerprint)
forall a. OccEnv a -&gt; OccName -&gt; a -&gt; OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#extendOccEnv"><span class="hs-identifier hs-var">extendOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177324"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177326"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177326"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177325"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177330"><span class="hs-identifier hs-var">env0</span></a></span><span>
</span><span id="line-942"></span><span>                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint -&gt; IfaceDecl -&gt; [(OccName, Fingerprint)]
</span><a href="GHC.Iface.Syntax.html#ifaceDeclFingerprints"><span class="hs-identifier hs-var">ifaceDeclFingerprints</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177329"><span class="hs-identifier hs-var">hash</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177328"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-943"></span><span>
</span><span id="line-944"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-945"></span><span>   </span><span class="hs-special">(</span><span id="local-6989586621681177321"><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177321"><span class="hs-identifier hs-var">local_env</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177320"><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177320"><span class="hs-identifier hs-var">decls_w_hashes</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-946"></span><span>       </span><span class="annot"><span class="annottext">((OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
 -&gt; SCC IfaceDeclABI
 -&gt; IO (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)]))
-&gt; (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
-&gt; [SCC IfaceDeclABI]
-&gt; IO (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Control.Monad.html#foldM"><span class="hs-identifier hs-var">foldM</span></a></span><span> </span><span class="annot"><span class="annottext">(OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
-&gt; SCC IfaceDeclABI
-&gt; IO (OccEnv (OccName, Fingerprint), [(Fingerprint, IfaceDecl)])
</span><a href="#local-6989586621681177363"><span class="hs-identifier hs-var">fingerprint_group</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
forall a. OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#emptyOccEnv"><span class="hs-identifier hs-var">emptyOccEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[SCC IfaceDeclABI]
</span><a href="#local-6989586621681177392"><span class="hs-identifier hs-var">groups</span></a></span><span>
</span><span id="line-947"></span><span>
</span><span id="line-948"></span><span>   </span><span class="hs-comment">-- when calculating fingerprints, we always need to use canonical</span><span>
</span><span id="line-949"></span><span>   </span><span class="hs-comment">-- ordering for lists of things.  In particular, the mi_deps has various</span><span>
</span><span id="line-950"></span><span>   </span><span class="hs-comment">-- lists of modules and suchlike, so put these all in canonical order:</span><span>
</span><span id="line-951"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177319"><span class="annot"><span class="annottext">sorted_deps :: Dependencies
</span><a href="#local-6989586621681177319"><span class="hs-identifier hs-var hs-var">sorted_deps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Dependencies -&gt; Dependencies
</span><a href="GHC.Iface.Recomp.html#sortDependencies"><span class="hs-identifier hs-var">sortDependencies</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-952"></span><span>
</span><span id="line-953"></span><span>   </span><span class="hs-comment">-- The export hash of a module depends on the orphan hashes of the</span><span>
</span><span id="line-954"></span><span>   </span><span class="hs-comment">-- orphan modules below us in the dependency tree.  This is the way</span><span>
</span><span id="line-955"></span><span>   </span><span class="hs-comment">-- that changes in orphans get propagated all the way up the</span><span>
</span><span id="line-956"></span><span>   </span><span class="hs-comment">-- dependency tree.</span><span>
</span><span id="line-957"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-958"></span><span>   </span><span class="hs-comment">-- Note [A bad dep_orphs optimization]</span><span>
</span><span id="line-959"></span><span>   </span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-960"></span><span>   </span><span class="hs-comment">-- In a previous version of this code, we filtered out orphan modules which</span><span>
</span><span id="line-961"></span><span>   </span><span class="hs-comment">-- were not from the home package, justifying it by saying that &quot;we'd</span><span>
</span><span id="line-962"></span><span>   </span><span class="hs-comment">-- pick up the ABI hashes of the external module instead&quot;.  This is wrong.</span><span>
</span><span id="line-963"></span><span>   </span><span class="hs-comment">-- Suppose that we have:</span><span>
</span><span id="line-964"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-965"></span><span>   </span><span class="hs-comment">--       module External where</span><span>
</span><span id="line-966"></span><span>   </span><span class="hs-comment">--           instance Show (a -&gt; b)</span><span>
</span><span id="line-967"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-968"></span><span>   </span><span class="hs-comment">--       module Home1 where</span><span>
</span><span id="line-969"></span><span>   </span><span class="hs-comment">--           import External</span><span>
</span><span id="line-970"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-971"></span><span>   </span><span class="hs-comment">--       module Home2 where</span><span>
</span><span id="line-972"></span><span>   </span><span class="hs-comment">--           import Home1</span><span>
</span><span id="line-973"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-974"></span><span>   </span><span class="hs-comment">-- The export hash of Home1 needs to reflect the orphan instances of</span><span>
</span><span id="line-975"></span><span>   </span><span class="hs-comment">-- External. It's true that Home1 will get rebuilt if the orphans</span><span>
</span><span id="line-976"></span><span>   </span><span class="hs-comment">-- of External, but we also need to make sure Home2 gets rebuilt</span><span>
</span><span id="line-977"></span><span>   </span><span class="hs-comment">-- as well.  See #12733 for more details.</span><span>
</span><span id="line-978"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177315"><span class="annot"><span class="annottext">orph_mods :: [Module]
</span><a href="#local-6989586621681177315"><span class="hs-identifier hs-var hs-var">orph_mods</span></a></span></span><span>
</span><span id="line-979"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module -&gt; Bool) -&gt; [Module] -&gt; [Module]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177446"><span class="hs-identifier hs-var">this_mod</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Note [Do not update EPS with your own hi-boot]</span><span>
</span><span id="line-980"></span><span>        </span><span class="annot"><span class="annottext">([Module] -&gt; [Module]) -&gt; [Module] -&gt; [Module]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies -&gt; [Module]
</span><a href="GHC.Driver.Types.html#dep_orphs"><span class="hs-identifier hs-var hs-var">dep_orphs</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177319"><span class="hs-identifier hs-var">sorted_deps</span></a></span><span>
</span><span id="line-981"></span><span>   </span><span id="local-6989586621681177313"><span class="annot"><span class="annottext">[Fingerprint]
</span><a href="#local-6989586621681177313"><span class="hs-identifier hs-var">dep_orphan_hashes</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; [Module] -&gt; IO [Fingerprint]
</span><a href="GHC.Iface.Recomp.html#getOrphanHashes"><span class="hs-identifier hs-var">getOrphanHashes</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177460"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681177315"><span class="hs-identifier hs-var">orph_mods</span></a></span><span>
</span><span id="line-982"></span><span>
</span><span id="line-983"></span><span>   </span><span class="hs-comment">-- Note [Do not update EPS with your own hi-boot]</span><span>
</span><span id="line-984"></span><span>   </span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-985"></span><span>   </span><span class="hs-comment">-- (See also #10182).  When your hs-boot file includes an orphan</span><span>
</span><span id="line-986"></span><span>   </span><span class="hs-comment">-- instance declaration, you may find that the dep_orphs of a module you</span><span>
</span><span id="line-987"></span><span>   </span><span class="hs-comment">-- import contains reference to yourself.  DO NOT actually load this module</span><span>
</span><span id="line-988"></span><span>   </span><span class="hs-comment">-- or add it to the orphan hashes: you're going to provide the orphan</span><span>
</span><span id="line-989"></span><span>   </span><span class="hs-comment">-- instances yourself, no need to consult hs-boot; if you do load the</span><span>
</span><span id="line-990"></span><span>   </span><span class="hs-comment">-- interface into EPS, you will see a duplicate orphan instance.</span><span>
</span><span id="line-991"></span><span>
</span><span id="line-992"></span><span>   </span><span id="local-6989586621681177311"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177311"><span class="hs-identifier hs-var">orphan_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(BinHandle -&gt; IfaceTopBndr -&gt; IO ())
-&gt; ([IfaceTopBndr], [IfaceRule], [IfaceFamInst]) -&gt; IO Fingerprint
forall a.
Binary a =&gt;
(BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; a -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Binary.html#computeFingerprint"><span class="hs-identifier hs-var">computeFingerprint</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint) -&gt; BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="#local-6989586621681177388"><span class="hs-identifier hs-var">mk_put_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177321"><span class="hs-identifier hs-var">local_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-993"></span><span>                                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; IfaceTopBndr) -&gt; [IfaceClsInst] -&gt; [IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#ifDFun"><span class="hs-identifier hs-var hs-var">ifDFun</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceClsInst]
</span><a href="#local-6989586621681177309"><span class="hs-identifier hs-var">orph_insts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177308"><span class="hs-identifier hs-var">orph_rules</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IfaceFamInst]
</span><a href="#local-6989586621681177307"><span class="hs-identifier hs-var">orph_fis</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-994"></span><span>
</span><span id="line-995"></span><span>   </span><span class="hs-comment">-- the export list hash doesn't depend on the fingerprints of</span><span>
</span><span id="line-996"></span><span>   </span><span class="hs-comment">-- the Names it mentions, only the Names themselves, hence putNameLiterally.</span><span>
</span><span id="line-997"></span><span>   </span><span id="local-6989586621681177306"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177306"><span class="hs-identifier hs-var">export_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(BinHandle -&gt; IfaceTopBndr -&gt; IO ())
-&gt; ([IfaceExport], Fingerprint, [Fingerprint], [(UnitId, Bool)],
    [Module], IfaceTrustInfo)
-&gt; IO Fingerprint
forall a.
Binary a =&gt;
(BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; a -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Binary.html#computeFingerprint"><span class="hs-identifier hs-var">computeFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-998"></span><span>                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceExport]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceExport]
</span><a href="GHC.Driver.Types.html#mi_exports"><span class="hs-identifier hs-var hs-var">mi_exports</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-999"></span><span>                       </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177311"><span class="hs-identifier hs-var">orphan_hash</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1000"></span><span>                       </span><span class="annot"><span class="annottext">[Fingerprint]
</span><a href="#local-6989586621681177313"><span class="hs-identifier hs-var">dep_orphan_hashes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1001"></span><span>                       </span><span class="annot"><span class="annottext">Dependencies -&gt; [(UnitId, Bool)]
</span><a href="GHC.Driver.Types.html#dep_pkgs"><span class="hs-identifier hs-var hs-var">dep_pkgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1002"></span><span>                       </span><span class="hs-comment">-- See Note [Export hash depends on non-orphan family instances]</span><span>
</span><span id="line-1003"></span><span>                       </span><span class="annot"><span class="annottext">Dependencies -&gt; [Module]
</span><a href="GHC.Driver.Types.html#dep_finsts"><span class="hs-identifier hs-var hs-var">dep_finsts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1004"></span><span>                        </span><span class="hs-comment">-- dep_pkgs: see &quot;Package Version Changes&quot; on</span><span>
</span><span id="line-1005"></span><span>                        </span><span class="hs-comment">-- wiki/commentary/compiler/recompilation-avoidance</span><span>
</span><span id="line-1006"></span><span>                       </span><span class="annot"><span class="annottext">PartialModIface -&gt; IfaceTrustInfo
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; IfaceTrustInfo
</span><a href="GHC.Driver.Types.html#mi_trust"><span class="hs-identifier hs-var hs-var">mi_trust</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1007"></span><span>                        </span><span class="hs-comment">-- Make sure change of Safe Haskell mode causes recomp.</span><span>
</span><span id="line-1008"></span><span>
</span><span id="line-1009"></span><span>   </span><span class="hs-comment">-- Note [Export hash depends on non-orphan family instances]</span><span>
</span><span id="line-1010"></span><span>   </span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-1011"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1012"></span><span>   </span><span class="hs-comment">-- Suppose we have:</span><span>
</span><span id="line-1013"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1014"></span><span>   </span><span class="hs-comment">--   module A where</span><span>
</span><span id="line-1015"></span><span>   </span><span class="hs-comment">--       type instance F Int = Bool</span><span>
</span><span id="line-1016"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1017"></span><span>   </span><span class="hs-comment">--   module B where</span><span>
</span><span id="line-1018"></span><span>   </span><span class="hs-comment">--       import A</span><span>
</span><span id="line-1019"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1020"></span><span>   </span><span class="hs-comment">--   module C where</span><span>
</span><span id="line-1021"></span><span>   </span><span class="hs-comment">--       import B</span><span>
</span><span id="line-1022"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1023"></span><span>   </span><span class="hs-comment">-- The family instance consistency check for C depends on the dep_finsts of</span><span>
</span><span id="line-1024"></span><span>   </span><span class="hs-comment">-- B.  If we rename module A to A2, when the dep_finsts of B changes, we need</span><span>
</span><span id="line-1025"></span><span>   </span><span class="hs-comment">-- to make sure that C gets rebuilt. Effectively, the dep_finsts are part of</span><span>
</span><span id="line-1026"></span><span>   </span><span class="hs-comment">-- the exports of B, because C always considers them when checking</span><span>
</span><span id="line-1027"></span><span>   </span><span class="hs-comment">-- consistency.</span><span>
</span><span id="line-1028"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1029"></span><span>   </span><span class="hs-comment">-- A full discussion is in #12723.</span><span>
</span><span id="line-1030"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1031"></span><span>   </span><span class="hs-comment">-- We do NOT need to hash dep_orphs, because this is implied by</span><span>
</span><span id="line-1032"></span><span>   </span><span class="hs-comment">-- dep_orphan_hashes, and we do not need to hash ordinary class instances,</span><span>
</span><span id="line-1033"></span><span>   </span><span class="hs-comment">-- because there is no eager consistency check as there is with type families</span><span>
</span><span id="line-1034"></span><span>   </span><span class="hs-comment">-- (also we didn't store it anywhere!)</span><span>
</span><span id="line-1035"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1036"></span><span>
</span><span id="line-1037"></span><span>   </span><span class="hs-comment">-- put the declarations in a canonical order, sorted by OccName</span><span>
</span><span id="line-1038"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681177302"><span class="hs-identifier hs-type">sorted_decls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1039"></span><span>       </span><span id="local-6989586621681177302"><span class="annot"><span class="annottext">sorted_decls :: [(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177302"><span class="hs-identifier hs-var hs-var">sorted_decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map OccName (Fingerprint, IfaceDecl) -&gt; [(Fingerprint, IfaceDecl)]
forall k a. Map k a -&gt; [a]
</span><a href="../../containers/src/Data.Map.Internal.html#elems"><span class="hs-identifier hs-var">Map.elems</span></a></span><span> </span><span class="annot"><span class="annottext">(Map OccName (Fingerprint, IfaceDecl)
 -&gt; [(Fingerprint, IfaceDecl)])
-&gt; Map OccName (Fingerprint, IfaceDecl)
-&gt; [(Fingerprint, IfaceDecl)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(OccName, (Fingerprint, IfaceDecl))]
-&gt; Map OccName (Fingerprint, IfaceDecl)
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(OccName, (Fingerprint, IfaceDecl))]
 -&gt; Map OccName (Fingerprint, IfaceDecl))
-&gt; [(OccName, (Fingerprint, IfaceDecl))]
-&gt; Map OccName (Fingerprint, IfaceDecl)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1040"></span><span>                          </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDecl -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177299"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Fingerprint, IfaceDecl)
</span><a href="#local-6989586621681177298"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681177298"><span class="annot"><span class="annottext">e :: (Fingerprint, IfaceDecl)
</span><a href="#local-6989586621681177298"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177299"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177299"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177320"><span class="hs-identifier hs-var">decls_w_hashes</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1041"></span><span>
</span><span id="line-1042"></span><span>   </span><span class="hs-comment">-- the flag hash depends on:</span><span>
</span><span id="line-1043"></span><span>   </span><span class="hs-comment">--   - (some of) dflags</span><span>
</span><span id="line-1044"></span><span>   </span><span class="hs-comment">-- it returns two hashes, one that shouldn't change</span><span>
</span><span id="line-1045"></span><span>   </span><span class="hs-comment">-- the abi hash and one that should</span><span>
</span><span id="line-1046"></span><span>   </span><span id="local-6989586621681177297"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177297"><span class="hs-identifier hs-var">flag_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module -&gt; (BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Flags.html#fingerprintDynFlags"><span class="hs-identifier hs-var">fingerprintDynFlags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177296"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177446"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-1047"></span><span>
</span><span id="line-1048"></span><span>   </span><span id="local-6989586621681177295"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177295"><span class="hs-identifier hs-var">opt_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Flags.html#fingerprintOptFlags"><span class="hs-identifier hs-var">fingerprintOptFlags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177296"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-1049"></span><span>
</span><span id="line-1050"></span><span>   </span><span id="local-6989586621681177294"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177294"><span class="hs-identifier hs-var">hpc_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Flags.html#fingerprintHpcFlags"><span class="hs-identifier hs-var">fingerprintHpcFlags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177296"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-1051"></span><span>
</span><span id="line-1052"></span><span>   </span><span id="local-6989586621681177293"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177293"><span class="hs-identifier hs-var">plugin_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.html#fingerprintPlugins"><span class="hs-identifier hs-var">fingerprintPlugins</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177460"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-1053"></span><span>
</span><span id="line-1054"></span><span>   </span><span class="hs-comment">-- the ABI hash depends on:</span><span>
</span><span id="line-1055"></span><span>   </span><span class="hs-comment">--   - decls</span><span>
</span><span id="line-1056"></span><span>   </span><span class="hs-comment">--   - export list</span><span>
</span><span id="line-1057"></span><span>   </span><span class="hs-comment">--   - orphans</span><span>
</span><span id="line-1058"></span><span>   </span><span class="hs-comment">--   - deprecations</span><span>
</span><span id="line-1059"></span><span>   </span><span class="hs-comment">--   - flag abi hash</span><span>
</span><span id="line-1060"></span><span>   </span><span id="local-6989586621681177292"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177292"><span class="hs-identifier hs-var">mod_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(BinHandle -&gt; IfaceTopBndr -&gt; IO ())
-&gt; ([Fingerprint], Fingerprint, Warnings) -&gt; IO Fingerprint
forall a.
Binary a =&gt;
(BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; a -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Binary.html#computeFingerprint"><span class="hs-identifier hs-var">computeFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-1061"></span><span>                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Fingerprint, IfaceDecl) -&gt; Fingerprint)
-&gt; [(Fingerprint, IfaceDecl)] -&gt; [Fingerprint]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Fingerprint, IfaceDecl) -&gt; Fingerprint
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681177302"><span class="hs-identifier hs-var">sorted_decls</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1062"></span><span>                       </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177306"><span class="hs-identifier hs-var">export_hash</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- includes orphan_hash</span><span>
</span><span id="line-1063"></span><span>                       </span><span class="annot"><span class="annottext">PartialModIface -&gt; Warnings
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Warnings
</span><a href="GHC.Driver.Types.html#mi_warns"><span class="hs-identifier hs-var hs-var">mi_warns</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1064"></span><span>
</span><span id="line-1065"></span><span>   </span><span class="hs-comment">-- The interface hash depends on:</span><span>
</span><span id="line-1066"></span><span>   </span><span class="hs-comment">--   - the ABI hash, plus</span><span>
</span><span id="line-1067"></span><span>   </span><span class="hs-comment">--   - the module level annotations,</span><span>
</span><span id="line-1068"></span><span>   </span><span class="hs-comment">--   - usages</span><span>
</span><span id="line-1069"></span><span>   </span><span class="hs-comment">--   - deps (home and external packages, dependent files)</span><span>
</span><span id="line-1070"></span><span>   </span><span class="hs-comment">--   - hpc</span><span>
</span><span id="line-1071"></span><span>   </span><span id="local-6989586621681177291"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177291"><span class="hs-identifier hs-var">iface_hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(BinHandle -&gt; IfaceTopBndr -&gt; IO ())
-&gt; (Fingerprint, [AnnPayload], [Usage], Dependencies, Bool)
-&gt; IO Fingerprint
forall a.
Binary a =&gt;
(BinHandle -&gt; IfaceTopBndr -&gt; IO ()) -&gt; a -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.Binary.html#computeFingerprint"><span class="hs-identifier hs-var">computeFingerprint</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceTopBndr -&gt; IO ()
</span><a href="GHC.Iface.Recomp.Binary.html#putNameLiterally"><span class="hs-identifier hs-var">putNameLiterally</span></a></span><span>
</span><span id="line-1072"></span><span>                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177292"><span class="hs-identifier hs-var">mod_hash</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1073"></span><span>                       </span><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177443"><span class="hs-identifier hs-var">ann_fn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkVarOcc"><span class="hs-identifier hs-var">mkVarOcc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;module&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- See mkIfaceAnnCache</span><span>
</span><span id="line-1074"></span><span>                       </span><span class="annot"><span class="annottext">PartialModIface -&gt; [Usage]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [Usage]
</span><a href="GHC.Driver.Types.html#mi_usages"><span class="hs-identifier hs-var hs-var">mi_usages</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1075"></span><span>                       </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177319"><span class="hs-identifier hs-var">sorted_deps</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1076"></span><span>                       </span><span class="annot"><span class="annottext">PartialModIface -&gt; Bool
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Bool
</span><a href="GHC.Driver.Types.html#mi_hpc"><span class="hs-identifier hs-var hs-var">mi_hpc</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1077"></span><span>
</span><span id="line-1078"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-1079"></span><span>    </span><span id="local-6989586621681177284"><span class="annot"><span class="annottext">final_iface_exts :: ModIfaceBackend
</span><a href="#local-6989586621681177284"><span class="hs-identifier hs-var hs-var">final_iface_exts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend :: Fingerprint
-&gt; Fingerprint
-&gt; Fingerprint
-&gt; Fingerprint
-&gt; Fingerprint
-&gt; Fingerprint
-&gt; Bool
-&gt; Bool
-&gt; Fingerprint
-&gt; Fingerprint
-&gt; (OccName -&gt; Maybe WarningTxt)
-&gt; (OccName -&gt; Maybe Fixity)
-&gt; (OccName -&gt; Maybe (OccName, Fingerprint))
-&gt; ModIfaceBackend
</span><a href="GHC.Driver.Types.html#ModIfaceBackend"><span class="hs-identifier hs-type">ModIfaceBackend</span></a></span><span>
</span><span id="line-1080"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mi_iface_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_iface_hash"><span class="hs-identifier hs-var">mi_iface_hash</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177291"><span class="hs-identifier hs-var">iface_hash</span></a></span><span>
</span><span id="line-1081"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_mod_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_mod_hash"><span class="hs-identifier hs-var">mi_mod_hash</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177292"><span class="hs-identifier hs-var">mod_hash</span></a></span><span>
</span><span id="line-1082"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_flag_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_flag_hash"><span class="hs-identifier hs-var">mi_flag_hash</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177297"><span class="hs-identifier hs-var">flag_hash</span></a></span><span>
</span><span id="line-1083"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_opt_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_opt_hash"><span class="hs-identifier hs-var">mi_opt_hash</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177295"><span class="hs-identifier hs-var">opt_hash</span></a></span><span>
</span><span id="line-1084"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_hpc_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_hpc_hash"><span class="hs-identifier hs-var">mi_hpc_hash</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177294"><span class="hs-identifier hs-var">hpc_hash</span></a></span><span>
</span><span id="line-1085"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_plugin_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_plugin_hash"><span class="hs-identifier hs-var">mi_plugin_hash</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177293"><span class="hs-identifier hs-var">plugin_hash</span></a></span><span>
</span><span id="line-1086"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_orphan :: Bool
</span><a href="GHC.Driver.Types.html#mi_orphan"><span class="hs-identifier hs-var">mi_orphan</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span>   </span><span class="annot"><span class="annottext">(IfaceRule -&gt; Bool) -&gt; [IfaceRule] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceRule -&gt; Bool
</span><a href="GHC.Iface.Syntax.html#ifRuleAuto"><span class="hs-identifier hs-var hs-var">ifRuleAuto</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177308"><span class="hs-identifier hs-var">orph_rules</span></a></span><span>
</span><span id="line-1087"></span><span>                                   </span><span class="hs-comment">-- See Note [Orphans and auto-generated rules]</span><span>
</span><span id="line-1088"></span><span>                              </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[IfaceClsInst] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceClsInst]
</span><a href="#local-6989586621681177309"><span class="hs-identifier hs-var">orph_insts</span></a></span><span>
</span><span id="line-1089"></span><span>                              </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[IfaceFamInst] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceFamInst]
</span><a href="#local-6989586621681177307"><span class="hs-identifier hs-var">orph_fis</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1090"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_finsts :: Bool
</span><a href="GHC.Driver.Types.html#mi_finsts"><span class="hs-identifier hs-var">mi_finsts</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[IfaceFamInst] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceFamInst]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceFamInst]
</span><a href="GHC.Driver.Types.html#mi_fam_insts"><span class="hs-identifier hs-var hs-var">mi_fam_insts</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1091"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_exp_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_exp_hash"><span class="hs-identifier hs-var">mi_exp_hash</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177306"><span class="hs-identifier hs-var">export_hash</span></a></span><span>
</span><span id="line-1092"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_orphan_hash :: Fingerprint
</span><a href="GHC.Driver.Types.html#mi_orphan_hash"><span class="hs-identifier hs-var">mi_orphan_hash</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681177311"><span class="hs-identifier hs-var">orphan_hash</span></a></span><span>
</span><span id="line-1093"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_warn_fn :: OccName -&gt; Maybe WarningTxt
</span><a href="GHC.Driver.Types.html#mi_warn_fn"><span class="hs-identifier hs-var">mi_warn_fn</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Maybe WarningTxt
</span><a href="#local-6989586621681177454"><span class="hs-identifier hs-var">warn_fn</span></a></span><span>
</span><span id="line-1094"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_fix_fn :: OccName -&gt; Maybe Fixity
</span><a href="GHC.Driver.Types.html#mi_fix_fn"><span class="hs-identifier hs-var">mi_fix_fn</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177451"><span class="hs-identifier hs-var">fix_fn</span></a></span><span>
</span><span id="line-1095"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_hash_fn :: OccName -&gt; Maybe (OccName, Fingerprint)
</span><a href="GHC.Driver.Types.html#mi_hash_fn"><span class="hs-identifier hs-var">mi_hash_fn</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
-&gt; OccName -&gt; Maybe (OccName, Fingerprint)
forall a. OccEnv a -&gt; OccName -&gt; Maybe a
</span><a href="GHC.Types.Name.Occurrence.html#lookupOccEnv"><span class="hs-identifier hs-var">lookupOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv (OccName, Fingerprint)
</span><a href="#local-6989586621681177321"><span class="hs-identifier hs-var">local_env</span></a></span><span>
</span><span id="line-1096"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-1097"></span><span>    </span><span id="local-6989586621681177273"><span class="annot"><span class="annottext">final_iface :: ModIface
</span><a href="#local-6989586621681177273"><span class="hs-identifier hs-var hs-var">final_iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mi_decls :: [IfaceDeclExts 'ModIfaceFinal]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var">mi_decls</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
[IfaceDeclExts 'ModIfaceFinal]
</span><a href="#local-6989586621681177302"><span class="hs-identifier hs-var">sorted_decls</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mi_final_exts :: IfaceBackendExts 'ModIfaceFinal
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var">mi_final_exts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681177284"><span class="hs-identifier hs-var">final_iface_exts</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1098"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-1099"></span><span>   </span><span class="annot"><span class="annottext">ModIface -&gt; IO ModIface
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177273"><span class="hs-identifier hs-var">final_iface</span></a></span><span>
</span><span id="line-1100"></span><span>
</span><span id="line-1101"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1102"></span><span>    </span><span id="local-6989586621681177446"><span class="annot"><span class="annottext">this_mod :: Module
</span><a href="#local-6989586621681177446"><span class="hs-identifier hs-var hs-var">this_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PartialModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span>
</span><span id="line-1103"></span><span>    </span><span id="local-6989586621681177408"><span class="annot"><span class="annottext">semantic_mod :: Module
</span><a href="#local-6989586621681177408"><span class="hs-identifier hs-var hs-var">semantic_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PartialModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_semantic_module"><span class="hs-identifier hs-var">mi_semantic_module</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span>
</span><span id="line-1104"></span><span>    </span><span id="local-6989586621681177296"><span class="annot"><span class="annottext">dflags :: DynFlags
</span><a href="#local-6989586621681177296"><span class="hs-identifier hs-var hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177460"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-1105"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681177441"><span class="annot"><span class="annottext">OccEnv [IfaceClsInst]
</span><a href="#local-6989586621681177441"><span class="hs-identifier hs-var">non_orph_insts</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177309"><span class="annot"><span class="annottext">[IfaceClsInst]
</span><a href="#local-6989586621681177309"><span class="hs-identifier hs-var">orph_insts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; IsOrphan)
-&gt; [IfaceClsInst] -&gt; (OccEnv [IfaceClsInst], [IfaceClsInst])
forall decl.
(decl -&gt; IsOrphan) -&gt; [decl] -&gt; (OccEnv [decl], [decl])
</span><a href="GHC.Iface.Recomp.html#mkOrphMap"><span class="hs-identifier hs-var">mkOrphMap</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; IsOrphan
</span><a href="GHC.Iface.Syntax.html#ifInstOrph"><span class="hs-identifier hs-var hs-var">ifInstOrph</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceClsInst]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceClsInst]
</span><a href="GHC.Driver.Types.html#mi_insts"><span class="hs-identifier hs-var hs-var">mi_insts</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1106"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681177442"><span class="annot"><span class="annottext">OccEnv [IfaceRule]
</span><a href="#local-6989586621681177442"><span class="hs-identifier hs-var">non_orph_rules</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177308"><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177308"><span class="hs-identifier hs-var">orph_rules</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceRule -&gt; IsOrphan)
-&gt; [IfaceRule] -&gt; (OccEnv [IfaceRule], [IfaceRule])
forall decl.
(decl -&gt; IsOrphan) -&gt; [decl] -&gt; (OccEnv [decl], [decl])
</span><a href="GHC.Iface.Recomp.html#mkOrphMap"><span class="hs-identifier hs-var">mkOrphMap</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceRule -&gt; IsOrphan
</span><a href="GHC.Iface.Syntax.html#ifRuleOrph"><span class="hs-identifier hs-var hs-var">ifRuleOrph</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceRule]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceRule]
</span><a href="GHC.Driver.Types.html#mi_rules"><span class="hs-identifier hs-var hs-var">mi_rules</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1107"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681177440"><span class="annot"><span class="annottext">OccEnv [IfaceFamInst]
</span><a href="#local-6989586621681177440"><span class="hs-identifier hs-var">non_orph_fis</span></a></span></span><span class="hs-special">,</span><span>   </span><span id="local-6989586621681177307"><span class="annot"><span class="annottext">[IfaceFamInst]
</span><a href="#local-6989586621681177307"><span class="hs-identifier hs-var">orph_fis</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceFamInst -&gt; IsOrphan)
-&gt; [IfaceFamInst] -&gt; (OccEnv [IfaceFamInst], [IfaceFamInst])
forall decl.
(decl -&gt; IsOrphan) -&gt; [decl] -&gt; (OccEnv [decl], [decl])
</span><a href="GHC.Iface.Recomp.html#mkOrphMap"><span class="hs-identifier hs-var">mkOrphMap</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; IsOrphan
</span><a href="GHC.Iface.Syntax.html#ifFamInstOrph"><span class="hs-identifier hs-var hs-var">ifFamInstOrph</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceFamInst]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceFamInst]
</span><a href="GHC.Driver.Types.html#mi_fam_insts"><span class="hs-identifier hs-var hs-var">mi_fam_insts</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1108"></span><span>    </span><span id="local-6989586621681177443"><span class="annot"><span class="annottext">ann_fn :: OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177443"><span class="hs-identifier hs-var hs-var">ann_fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceAnnotation] -&gt; OccName -&gt; [AnnPayload]
</span><a href="GHC.Iface.Recomp.html#mkIfaceAnnCache"><span class="hs-identifier hs-var">mkIfaceAnnCache</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceAnnotation]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceAnnotation]
</span><a href="GHC.Driver.Types.html#mi_anns"><span class="hs-identifier hs-var hs-var">mi_anns</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681177459"><span class="hs-identifier hs-var">iface0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1109"></span><span>
</span><span id="line-1110"></span><span class="hs-comment">-- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules</span><span>
</span><span id="line-1111"></span><span class="hs-comment">-- (in particular, the orphan modules which are transitively imported by the</span><span>
</span><span id="line-1112"></span><span class="hs-comment">-- current module).</span><span>
</span><span id="line-1113"></span><span class="hs-comment">--</span><span>
</span><span id="line-1114"></span><span class="hs-comment">-- Q: Why do we need the hash at all, doesn't the list of transitively</span><span>
</span><span id="line-1115"></span><span class="hs-comment">-- imported orphan modules suffice?</span><span>
</span><span id="line-1116"></span><span class="hs-comment">--</span><span>
</span><span id="line-1117"></span><span class="hs-comment">-- A: If one of our transitive imports adds a new orphan instance, our</span><span>
</span><span id="line-1118"></span><span class="hs-comment">-- export hash must change so that modules which import us rebuild.  If we just</span><span>
</span><span id="line-1119"></span><span class="hs-comment">-- hashed the [Module], the hash would not change even when a new instance was</span><span>
</span><span id="line-1120"></span><span class="hs-comment">-- added to a module that already had an orphan instance.</span><span>
</span><span id="line-1121"></span><span class="hs-comment">--</span><span>
</span><span id="line-1122"></span><span class="hs-comment">-- Q: Why don't we just hash the orphan hashes of our direct dependencies?</span><span>
</span><span id="line-1123"></span><span class="hs-comment">-- Why the full transitive closure?</span><span>
</span><span id="line-1124"></span><span class="hs-comment">--</span><span>
</span><span id="line-1125"></span><span class="hs-comment">-- A: Suppose we have these modules:</span><span>
</span><span id="line-1126"></span><span class="hs-comment">--</span><span>
</span><span id="line-1127"></span><span class="hs-comment">--      module A where</span><span>
</span><span id="line-1128"></span><span class="hs-comment">--          instance Show (a -&gt; b) where</span><span>
</span><span id="line-1129"></span><span class="hs-comment">--      module B where</span><span>
</span><span id="line-1130"></span><span class="hs-comment">--          import A -- **</span><span>
</span><span id="line-1131"></span><span class="hs-comment">--      module C where</span><span>
</span><span id="line-1132"></span><span class="hs-comment">--          import A</span><span>
</span><span id="line-1133"></span><span class="hs-comment">--          import B</span><span>
</span><span id="line-1134"></span><span class="hs-comment">--</span><span>
</span><span id="line-1135"></span><span class="hs-comment">-- Whether or not we add or remove the import to A in B affects the</span><span>
</span><span id="line-1136"></span><span class="hs-comment">-- orphan hash of B.  But it shouldn't really affect the orphan hash</span><span>
</span><span id="line-1137"></span><span class="hs-comment">-- of C.  If we hashed only direct dependencies, there would be no</span><span>
</span><span id="line-1138"></span><span class="hs-comment">-- way to tell that the net effect was a wash, and we'd be forced</span><span>
</span><span id="line-1139"></span><span class="hs-comment">-- to recompile C and everything else.</span><span>
</span><span id="line-1140"></span><span class="annot"><a href="GHC.Iface.Recomp.html#getOrphanHashes"><span class="hs-identifier hs-type">getOrphanHashes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1141"></span><span id="getOrphanHashes"><span class="annot"><span class="annottext">getOrphanHashes :: HscEnv -&gt; [Module] -&gt; IO [Fingerprint]
</span><a href="GHC.Iface.Recomp.html#getOrphanHashes"><span class="hs-identifier hs-var hs-var">getOrphanHashes</span></a></span></span><span> </span><span id="local-6989586621681177264"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177264"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177263"><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681177263"><span class="hs-identifier hs-var">mods</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1142"></span><span>  </span><span id="local-6989586621681177262"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177262"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; IO ExternalPackageState
</span><a href="GHC.Driver.Types.html#hscEPS"><span class="hs-identifier hs-var">hscEPS</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177264"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-1143"></span><span>  </span><span class="hs-keyword">let</span><span>
</span><span id="line-1144"></span><span>    </span><span id="local-6989586621681177261"><span class="annot"><span class="annottext">hpt :: HomePackageTable
</span><a href="#local-6989586621681177261"><span class="hs-identifier hs-var hs-var">hpt</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; HomePackageTable
</span><a href="GHC.Driver.Types.html#hsc_HPT"><span class="hs-identifier hs-var hs-var">hsc_HPT</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177264"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-1145"></span><span>    </span><span id="local-6989586621681177259"><span class="annot"><span class="annottext">pit :: PackageIfaceTable
</span><a href="#local-6989586621681177259"><span class="hs-identifier hs-var hs-var">pit</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var hs-var">eps_PIT</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177262"><span class="hs-identifier hs-var">eps</span></a></span><span>
</span><span id="line-1146"></span><span>    </span><span id="local-6989586621681177254"><span class="annot"><span class="annottext">get_orph_hash :: Module -&gt; IO Fingerprint
</span><a href="#local-6989586621681177254"><span class="hs-identifier hs-var hs-var">get_orph_hash</span></a></span></span><span> </span><span id="local-6989586621681177253"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177253"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1147"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HomePackageTable -&gt; PackageIfaceTable -&gt; Module -&gt; Maybe ModIface
</span><a href="GHC.Driver.Types.html#lookupIfaceByModule"><span class="hs-identifier hs-var">lookupIfaceByModule</span></a></span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681177261"><span class="hs-identifier hs-var">hpt</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIfaceTable
</span><a href="#local-6989586621681177259"><span class="hs-identifier hs-var">pit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177253"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1148"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177251"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177251"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; IO Fingerprint
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_orphan_hash"><span class="hs-identifier hs-var hs-var">mi_orphan_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177251"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1149"></span><span>            </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-comment">-- similar to 'mkHashFun'</span><span>
</span><span id="line-1150"></span><span>                </span><span id="local-6989586621681177250"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177250"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; IfG ModIface -&gt; IO ModIface
forall a. HscEnv -&gt; IfG a -&gt; IO a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceLoad"><span class="hs-identifier hs-var">initIfaceLoad</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177264"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">(IfG ModIface -&gt; IO ModIface)
-&gt; (IfM () (MaybeErr SDoc ModIface) -&gt; IfG ModIface)
-&gt; IfM () (MaybeErr SDoc ModIface)
-&gt; IO ModIface
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfM () (MaybeErr SDoc ModIface) -&gt; IfG ModIface
forall gbl lcl a.
TcRnIf gbl lcl (MaybeErr SDoc a) -&gt; TcRnIf gbl lcl a
</span><a href="GHC.Tc.Utils.Monad.html#withException"><span class="hs-identifier hs-var">withException</span></a></span><span>
</span><span id="line-1151"></span><span>                            </span><span class="annot"><span class="annottext">(IfM () (MaybeErr SDoc ModIface) -&gt; IO ModIface)
-&gt; IfM () (MaybeErr SDoc ModIface) -&gt; IO ModIface
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Module -&gt; WhereFrom -&gt; IfM () (MaybeErr SDoc ModIface)
forall lcl.
SDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr SDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var">loadInterface</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getOrphanHashes&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177253"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportBySystem"><span class="hs-identifier hs-var">ImportBySystem</span></a></span><span>
</span><span id="line-1152"></span><span>                </span><span class="annot"><span class="annottext">Fingerprint -&gt; IO Fingerprint
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_orphan_hash"><span class="hs-identifier hs-var hs-var">mi_orphan_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681177250"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1153"></span><span>
</span><span id="line-1154"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-1155"></span><span>  </span><span class="annot"><span class="annottext">(Module -&gt; IO Fingerprint) -&gt; [Module] -&gt; IO [Fingerprint]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; IO Fingerprint
</span><a href="#local-6989586621681177254"><span class="hs-identifier hs-var">get_orph_hash</span></a></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681177263"><span class="hs-identifier hs-var">mods</span></a></span><span>
</span><span id="line-1156"></span><span>
</span><span id="line-1157"></span><span>
</span><span id="line-1158"></span><span class="annot"><a href="GHC.Iface.Recomp.html#sortDependencies"><span class="hs-identifier hs-type">sortDependencies</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Dependencies"><span class="hs-identifier hs-type">Dependencies</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Dependencies"><span class="hs-identifier hs-type">Dependencies</span></a></span><span>
</span><span id="line-1159"></span><span id="sortDependencies"><span class="annot"><span class="annottext">sortDependencies :: Dependencies -&gt; Dependencies
</span><a href="GHC.Iface.Recomp.html#sortDependencies"><span class="hs-identifier hs-var hs-var">sortDependencies</span></a></span></span><span> </span><span id="local-6989586621681177247"><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177247"><span class="hs-identifier hs-var">d</span></a></span></span><span>
</span><span id="line-1160"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Deps :: [ModuleNameWithIsBoot]
-&gt; [(UnitId, Bool)]
-&gt; [Module]
-&gt; [Module]
-&gt; [ModuleName]
-&gt; Dependencies
</span><a href="GHC.Driver.Types.html#Deps"><span class="hs-identifier hs-type">Deps</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dep_mods :: [ModuleNameWithIsBoot]
</span><a href="GHC.Driver.Types.html#dep_mods"><span class="hs-identifier hs-var">dep_mods</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ModuleNameWithIsBoot -&gt; ModuleNameWithIsBoot -&gt; Ordering)
-&gt; [ModuleNameWithIsBoot] -&gt; [ModuleNameWithIsBoot]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">(FastString -&gt; FastString -&gt; Ordering)
-&gt; (ModuleNameWithIsBoot -&gt; FastString)
-&gt; ModuleNameWithIsBoot
-&gt; ModuleNameWithIsBoot
-&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; FastString
</span><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-var">moduleNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; FastString)
-&gt; (ModuleNameWithIsBoot -&gt; ModuleName)
-&gt; ModuleNameWithIsBoot
-&gt; FastString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleNameWithIsBoot -&gt; ModuleName
forall mod. GenWithIsBoot mod -&gt; mod
</span><a href="GHC.Unit.Types.html#gwib_mod"><span class="hs-identifier hs-var hs-var">gwib_mod</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dependencies -&gt; [ModuleNameWithIsBoot]
</span><a href="GHC.Driver.Types.html#dep_mods"><span class="hs-identifier hs-var hs-var">dep_mods</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177247"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1161"></span><span>          </span><span class="annot"><span class="annottext">dep_pkgs :: [(UnitId, Bool)]
</span><a href="GHC.Driver.Types.html#dep_pkgs"><span class="hs-identifier hs-var">dep_pkgs</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((UnitId, Bool) -&gt; (UnitId, Bool) -&gt; Ordering)
-&gt; [(UnitId, Bool)] -&gt; [(UnitId, Bool)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnitId -&gt; UnitId -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">(UnitId -&gt; UnitId -&gt; Ordering)
-&gt; ((UnitId, Bool) -&gt; UnitId)
-&gt; (UnitId, Bool)
-&gt; (UnitId, Bool)
-&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="annot"><span class="annottext">(UnitId, Bool) -&gt; UnitId
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dependencies -&gt; [(UnitId, Bool)]
</span><a href="GHC.Driver.Types.html#dep_pkgs"><span class="hs-identifier hs-var hs-var">dep_pkgs</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177247"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1162"></span><span>          </span><span class="annot"><span class="annottext">dep_orphs :: [Module]
</span><a href="GHC.Driver.Types.html#dep_orphs"><span class="hs-identifier hs-var">dep_orphs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module -&gt; Module -&gt; Ordering) -&gt; [Module] -&gt; [Module]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Ordering
</span><a href="GHC.Unit.Module.html#stableModuleCmp"><span class="hs-identifier hs-var">stableModuleCmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dependencies -&gt; [Module]
</span><a href="GHC.Driver.Types.html#dep_orphs"><span class="hs-identifier hs-var hs-var">dep_orphs</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177247"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1163"></span><span>          </span><span class="annot"><span class="annottext">dep_finsts :: [Module]
</span><a href="GHC.Driver.Types.html#dep_finsts"><span class="hs-identifier hs-var">dep_finsts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module -&gt; Module -&gt; Ordering) -&gt; [Module] -&gt; [Module]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Ordering
</span><a href="GHC.Unit.Module.html#stableModuleCmp"><span class="hs-identifier hs-var">stableModuleCmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dependencies -&gt; [Module]
</span><a href="GHC.Driver.Types.html#dep_finsts"><span class="hs-identifier hs-var hs-var">dep_finsts</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177247"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1164"></span><span>          </span><span class="annot"><span class="annottext">dep_plgins :: [ModuleName]
</span><a href="GHC.Driver.Types.html#dep_plgins"><span class="hs-identifier hs-var">dep_plgins</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; ModuleName -&gt; Ordering)
-&gt; [ModuleName] -&gt; [ModuleName]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">(FastString -&gt; FastString -&gt; Ordering)
-&gt; (ModuleName -&gt; FastString)
-&gt; ModuleName
-&gt; ModuleName
-&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; FastString
</span><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-var">moduleNameFS</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dependencies -&gt; [ModuleName]
</span><a href="GHC.Driver.Types.html#dep_plgins"><span class="hs-identifier hs-var hs-var">dep_plgins</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681177247"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1165"></span><span>
</span><span id="line-1166"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
          The ABI of an IfaceDecl
*                                                                      *
************************************************************************

Note [The ABI of an IfaceDecl]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ABI of a declaration consists of:

   (a) the full name of the identifier (inc. module and package,
       because these are used to construct the symbol name by which
       the identifier is known externally).

   (b) the declaration itself, as exposed to clients.  That is, the
       definition of an Id is included in the fingerprint only if
       it is made available as an unfolding in the interface.

   (c) the fixity of the identifier (if it exists)
   (d) for Ids: rules
   (e) for classes: instances, fixity &amp; rules for methods
   (f) for datatypes: instances, fixity &amp; rules for constrs

Items (c)-(f) are not stored in the IfaceDecl, but instead appear
elsewhere in the interface file.  But they are *fingerprinted* with
the declaration itself. This is done by grouping (c)-(f) in IfaceDeclExtras,
and fingerprinting that as part of the declaration.
-}</span><span>
</span><span id="line-1195"></span><span>
</span><span id="line-1196"></span><span class="hs-keyword">type</span><span> </span><span id="IfaceDeclABI"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-var">IfaceDeclABI</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclExtras"><span class="hs-identifier hs-type">IfaceDeclExtras</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1197"></span><span>
</span><span id="line-1198"></span><span class="hs-keyword">data</span><span> </span><span id="IfaceDeclExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclExtras"><span class="hs-identifier hs-var">IfaceDeclExtras</span></a></span></span><span>
</span><span id="line-1199"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="IfaceIdExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-var">IfaceIdExtras</span></a></span></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span>
</span><span id="line-1200"></span><span>
</span><span id="line-1201"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="IfaceDataExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDataExtras"><span class="hs-identifier hs-var">IfaceDataExtras</span></a></span></span><span>
</span><span id="line-1202"></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-comment">-- Fixity of the tycon itself (if it exists)</span><span>
</span><span id="line-1203"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceInstABI"><span class="hs-identifier hs-type">IfaceInstABI</span></a></span><span class="hs-special">]</span><span>           </span><span class="hs-comment">-- Local class and family instances of this tycon</span><span>
</span><span id="line-1204"></span><span>                                </span><span class="hs-comment">-- See Note [Orphans] in GHC.Core.InstEnv</span><span>
</span><span id="line-1205"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Annotations.html#AnnPayload"><span class="hs-identifier hs-type">AnnPayload</span></a></span><span class="hs-special">]</span><span>             </span><span class="hs-comment">-- Annotations of the type itself</span><span>
</span><span id="line-1206"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span class="hs-special">]</span><span>          </span><span class="hs-comment">-- For each constructor: fixity, RULES and annotations</span><span>
</span><span id="line-1207"></span><span>
</span><span id="line-1208"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="IfaceClassExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceClassExtras"><span class="hs-identifier hs-var">IfaceClassExtras</span></a></span></span><span>
</span><span id="line-1209"></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-comment">-- Fixity of the class itself (if it exists)</span><span>
</span><span id="line-1210"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceInstABI"><span class="hs-identifier hs-type">IfaceInstABI</span></a></span><span class="hs-special">]</span><span>           </span><span class="hs-comment">-- Local instances of this class *or*</span><span>
</span><span id="line-1211"></span><span>                                </span><span class="hs-comment">--   of its associated data types</span><span>
</span><span id="line-1212"></span><span>                                </span><span class="hs-comment">-- See Note [Orphans] in GHC.Core.InstEnv</span><span>
</span><span id="line-1213"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Annotations.html#AnnPayload"><span class="hs-identifier hs-type">AnnPayload</span></a></span><span class="hs-special">]</span><span>             </span><span class="hs-comment">-- Annotations of the type itself</span><span>
</span><span id="line-1214"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span class="hs-special">]</span><span>          </span><span class="hs-comment">-- For each class method: fixity, RULES and annotations</span><span>
</span><span id="line-1215"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Type.html#IfExtName"><span class="hs-identifier hs-type">IfExtName</span></a></span><span class="hs-special">]</span><span>              </span><span class="hs-comment">-- Default methods. If a module</span><span>
</span><span id="line-1216"></span><span>                                </span><span class="hs-comment">-- mentions a class, then it can</span><span>
</span><span id="line-1217"></span><span>                                </span><span class="hs-comment">-- instantiate the class and thereby</span><span>
</span><span id="line-1218"></span><span>                                </span><span class="hs-comment">-- use the default methods, so we must</span><span>
</span><span id="line-1219"></span><span>                                </span><span class="hs-comment">-- include these in the fingerprint of</span><span>
</span><span id="line-1220"></span><span>                                </span><span class="hs-comment">-- a class.</span><span>
</span><span id="line-1221"></span><span>
</span><span id="line-1222"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="IfaceSynonymExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceSynonymExtras"><span class="hs-identifier hs-var">IfaceSynonymExtras</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Annotations.html#AnnPayload"><span class="hs-identifier hs-type">AnnPayload</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1223"></span><span>
</span><span id="line-1224"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="IfaceFamilyExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceFamilyExtras"><span class="hs-identifier hs-var">IfaceFamilyExtras</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceInstABI"><span class="hs-identifier hs-type">IfaceInstABI</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Annotations.html#AnnPayload"><span class="hs-identifier hs-type">AnnPayload</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1225"></span><span>
</span><span id="line-1226"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="IfaceOtherDeclExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceOtherDeclExtras"><span class="hs-identifier hs-var">IfaceOtherDeclExtras</span></a></span></span><span>
</span><span id="line-1227"></span><span>
</span><span id="line-1228"></span><span class="hs-keyword">data</span><span> </span><span id="IfaceIdExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-var">IfaceIdExtras</span></a></span></span><span>
</span><span id="line-1229"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="IdExtras"><span class="annot"><a href="GHC.Iface.Recomp.html#IdExtras"><span class="hs-identifier hs-var">IdExtras</span></a></span></span><span>
</span><span id="line-1230"></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-comment">-- Fixity of the Id (if it exists)</span><span>
</span><span id="line-1231"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceRule"><span class="hs-identifier hs-type">IfaceRule</span></a></span><span class="hs-special">]</span><span>              </span><span class="hs-comment">-- Rules for the Id</span><span>
</span><span id="line-1232"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Annotations.html#AnnPayload"><span class="hs-identifier hs-type">AnnPayload</span></a></span><span class="hs-special">]</span><span>             </span><span class="hs-comment">-- Annotations for the Id</span><span>
</span><span id="line-1233"></span><span>
</span><span id="line-1234"></span><span class="hs-comment">-- When hashing a class or family instance, we hash only the</span><span>
</span><span id="line-1235"></span><span class="hs-comment">-- DFunId or CoAxiom, because that depends on all the</span><span>
</span><span id="line-1236"></span><span class="hs-comment">-- information about the instance.</span><span>
</span><span id="line-1237"></span><span class="hs-comment">--</span><span>
</span><span id="line-1238"></span><span class="hs-keyword">type</span><span> </span><span id="IfaceInstABI"><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceInstABI"><span class="hs-identifier hs-var">IfaceInstABI</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Iface.Type.html#IfExtName"><span class="hs-identifier hs-type">IfExtName</span></a></span><span>   </span><span class="hs-comment">-- Name of DFunId or CoAxiom that is evidence for the instance</span><span>
</span><span id="line-1239"></span><span>
</span><span id="line-1240"></span><span class="annot"><a href="GHC.Iface.Recomp.html#abiDecl"><span class="hs-identifier hs-type">abiDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span>
</span><span id="line-1241"></span><span id="abiDecl"><span class="annot"><span class="annottext">abiDecl :: IfaceDeclABI -&gt; IfaceDecl
</span><a href="GHC.Iface.Recomp.html#abiDecl"><span class="hs-identifier hs-var hs-var">abiDecl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177232"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177232"><span class="hs-identifier hs-var">decl</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177232"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-1242"></span><span>
</span><span id="line-1243"></span><span class="annot"><a href="GHC.Iface.Recomp.html#cmp_abiNames"><span class="hs-identifier hs-type">cmp_abiNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-1244"></span><span id="cmp_abiNames"><span class="annot"><span class="annottext">cmp_abiNames :: IfaceDeclABI -&gt; IfaceDeclABI -&gt; Ordering
</span><a href="GHC.Iface.Recomp.html#cmp_abiNames"><span class="hs-identifier hs-var hs-var">cmp_abiNames</span></a></span></span><span> </span><span id="local-6989586621681177231"><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177231"><span class="hs-identifier hs-var">abi1</span></a></span></span><span> </span><span id="local-6989586621681177230"><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177230"><span class="hs-identifier hs-var">abi2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDeclABI -&gt; IfaceDecl
</span><a href="GHC.Iface.Recomp.html#abiDecl"><span class="hs-identifier hs-var">abiDecl</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177231"><span class="hs-identifier hs-var">abi1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccName -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span>
</span><span id="line-1245"></span><span>                         </span><span class="annot"><span class="annottext">IfaceDecl -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDeclABI -&gt; IfaceDecl
</span><a href="GHC.Iface.Recomp.html#abiDecl"><span class="hs-identifier hs-var">abiDecl</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclABI
</span><a href="#local-6989586621681177230"><span class="hs-identifier hs-var">abi2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1246"></span><span>
</span><span id="line-1247"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesDeclABI"><span class="hs-identifier hs-type">freeNamesDeclABI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclABI"><span class="hs-identifier hs-type">IfaceDeclABI</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-1248"></span><span id="freeNamesDeclABI"><span class="annot"><span class="annottext">freeNamesDeclABI :: IfaceDeclABI -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesDeclABI"><span class="hs-identifier hs-var hs-var">freeNamesDeclABI</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177228"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177228"><span class="hs-identifier hs-var">_mod</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177227"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177227"><span class="hs-identifier hs-var">decl</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177226"><span class="annot"><span class="annottext">IfaceDeclExtras
</span><a href="#local-6989586621681177226"><span class="hs-identifier hs-var">extras</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1249"></span><span>  </span><span class="annot"><span class="annottext">IfaceDecl -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#freeNamesIfDecl"><span class="hs-identifier hs-var">freeNamesIfDecl</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177227"><span class="hs-identifier hs-var">decl</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr
-&gt; UniqSet IfaceTopBndr -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-var">freeNamesDeclExtras</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras
</span><a href="#local-6989586621681177226"><span class="hs-identifier hs-var">extras</span></a></span><span>
</span><span id="line-1250"></span><span>
</span><span id="line-1251"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-type">freeNamesDeclExtras</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclExtras"><span class="hs-identifier hs-type">IfaceDeclExtras</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-1252"></span><span id="freeNamesDeclExtras"><span class="annot"><span class="annottext">freeNamesDeclExtras :: IfaceDeclExtras -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-var hs-var">freeNamesDeclExtras</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span> </span><span id="local-6989586621681177222"><span class="annot"><span class="annottext">IfaceIdExtras
</span><a href="#local-6989586621681177222"><span class="hs-identifier hs-var">id_extras</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1253"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesIdExtras"><span class="hs-identifier hs-var">freeNamesIdExtras</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras
</span><a href="#local-6989586621681177222"><span class="hs-identifier hs-var">id_extras</span></a></span><span>
</span><span id="line-1254"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-var">freeNamesDeclExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDataExtras"><span class="hs-identifier hs-type">IfaceDataExtras</span></a></span><span>  </span><span class="annot"><span class="annottext">Maybe Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177220"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177220"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177219"><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177219"><span class="hs-identifier hs-var">subs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1255"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UniqSet IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#unionNameSets"><span class="hs-identifier hs-var">unionNameSets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#mkNameSet"><span class="hs-identifier hs-var">mkNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177220"><span class="hs-identifier hs-var">insts</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr
-&gt; [UniqSet IfaceTopBndr] -&gt; [UniqSet IfaceTopBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(IfaceIdExtras -&gt; UniqSet IfaceTopBndr)
-&gt; [IfaceIdExtras] -&gt; [UniqSet IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesIdExtras"><span class="hs-identifier hs-var">freeNamesIdExtras</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177219"><span class="hs-identifier hs-var">subs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1256"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-var">freeNamesDeclExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceClassExtras"><span class="hs-identifier hs-type">IfaceClassExtras</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177216"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177216"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177215"><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177215"><span class="hs-identifier hs-var">subs</span></a></span></span><span> </span><span id="local-6989586621681177214"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177214"><span class="hs-identifier hs-var">defms</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1257"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UniqSet IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#unionNameSets"><span class="hs-identifier hs-var">unionNameSets</span></a></span><span> </span><span class="annot"><span class="annottext">([UniqSet IfaceTopBndr] -&gt; UniqSet IfaceTopBndr)
-&gt; [UniqSet IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1258"></span><span>      </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#mkNameSet"><span class="hs-identifier hs-var">mkNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177216"><span class="hs-identifier hs-var">insts</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr
-&gt; [UniqSet IfaceTopBndr] -&gt; [UniqSet IfaceTopBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#mkNameSet"><span class="hs-identifier hs-var">mkNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177214"><span class="hs-identifier hs-var">defms</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr
-&gt; [UniqSet IfaceTopBndr] -&gt; [UniqSet IfaceTopBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(IfaceIdExtras -&gt; UniqSet IfaceTopBndr)
-&gt; [IfaceIdExtras] -&gt; [UniqSet IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesIdExtras"><span class="hs-identifier hs-var">freeNamesIdExtras</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177215"><span class="hs-identifier hs-var">subs</span></a></span><span>
</span><span id="line-1259"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-var">freeNamesDeclExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceSynonymExtras"><span class="hs-identifier hs-type">IfaceSynonymExtras</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-1260"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-1261"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-var">freeNamesDeclExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceFamilyExtras"><span class="hs-identifier hs-type">IfaceFamilyExtras</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177212"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177212"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-1262"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#mkNameSet"><span class="hs-identifier hs-var">mkNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177212"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-1263"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesDeclExtras"><span class="hs-identifier hs-var">freeNamesDeclExtras</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceOtherDeclExtras"><span class="hs-identifier hs-var">IfaceOtherDeclExtras</span></a></span><span>
</span><span id="line-1264"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-1265"></span><span>
</span><span id="line-1266"></span><span class="annot"><a href="GHC.Iface.Recomp.html#freeNamesIdExtras"><span class="hs-identifier hs-type">freeNamesIdExtras</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-1267"></span><span id="freeNamesIdExtras"><span class="annot"><span class="annottext">freeNamesIdExtras :: IfaceIdExtras -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Recomp.html#freeNamesIdExtras"><span class="hs-identifier hs-var hs-var">freeNamesIdExtras</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IdExtras"><span class="hs-identifier hs-type">IdExtras</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681177211"><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177211"><span class="hs-identifier hs-var">rules</span></a></span></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UniqSet IfaceTopBndr] -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Types.Name.Set.html#unionNameSets"><span class="hs-identifier hs-var">unionNameSets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceRule -&gt; UniqSet IfaceTopBndr)
-&gt; [IfaceRule] -&gt; [UniqSet IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceRule -&gt; UniqSet IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#freeNamesIfRule"><span class="hs-identifier hs-var">freeNamesIfRule</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177211"><span class="hs-identifier hs-var">rules</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1268"></span><span>
</span><span id="line-1269"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681177207"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclExtras"><span class="hs-identifier hs-type">IfaceDeclExtras</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1270"></span><span>  </span><span id="local-6989586621681177195"><span class="annot"><span class="annottext">ppr :: IfaceDeclExtras -&gt; SDoc
</span><a href="#local-6989586621681177195"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceOtherDeclExtras"><span class="hs-identifier hs-var">IfaceOtherDeclExtras</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-1271"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span>  </span><span id="local-6989586621681177193"><span class="annot"><span class="annottext">IfaceIdExtras
</span><a href="#local-6989586621681177193"><span class="hs-identifier hs-var">extras</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_id_extras"><span class="hs-identifier hs-var">ppr_id_extras</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras
</span><a href="#local-6989586621681177193"><span class="hs-identifier hs-var">extras</span></a></span><span>
</span><span id="line-1272"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceSynonymExtras"><span class="hs-identifier hs-type">IfaceSynonymExtras</span></a></span><span> </span><span id="local-6989586621681177191"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177191"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177190"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177190"><span class="hs-identifier hs-var">anns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Maybe Fixity -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177191"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[AnnPayload] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177190"><span class="hs-identifier hs-var">anns</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1273"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceFamilyExtras"><span class="hs-identifier hs-type">IfaceFamilyExtras</span></a></span><span> </span><span id="local-6989586621681177188"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177188"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177187"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177187"><span class="hs-identifier hs-var">finsts</span></a></span></span><span> </span><span id="local-6989586621681177186"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177186"><span class="hs-identifier hs-var">anns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Maybe Fixity -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177188"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177187"><span class="hs-identifier hs-var">finsts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[AnnPayload] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177186"><span class="hs-identifier hs-var">anns</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1274"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDataExtras"><span class="hs-identifier hs-type">IfaceDataExtras</span></a></span><span> </span><span id="local-6989586621681177185"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177185"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177184"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177184"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span id="local-6989586621681177183"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177183"><span class="hs-identifier hs-var">anns</span></a></span></span><span> </span><span id="local-6989586621681177182"><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177182"><span class="hs-identifier hs-var">stuff</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Maybe Fixity -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177185"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_insts"><span class="hs-identifier hs-var">ppr_insts</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177184"><span class="hs-identifier hs-var">insts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[AnnPayload] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177183"><span class="hs-identifier hs-var">anns</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1275"></span><span>                                                </span><span class="annot"><span class="annottext">[IfaceIdExtras] -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_id_extras_s"><span class="hs-identifier hs-var">ppr_id_extras_s</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177182"><span class="hs-identifier hs-var">stuff</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1276"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceClassExtras"><span class="hs-identifier hs-type">IfaceClassExtras</span></a></span><span> </span><span id="local-6989586621681177179"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177179"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177178"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177178"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span id="local-6989586621681177177"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177177"><span class="hs-identifier hs-var">anns</span></a></span></span><span> </span><span id="local-6989586621681177176"><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177176"><span class="hs-identifier hs-var">stuff</span></a></span></span><span> </span><span id="local-6989586621681177175"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177175"><span class="hs-identifier hs-var">defms</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1277"></span><span>    </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Maybe Fixity -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177179"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_insts"><span class="hs-identifier hs-var">ppr_insts</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177178"><span class="hs-identifier hs-var">insts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[AnnPayload] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177177"><span class="hs-identifier hs-var">anns</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1278"></span><span>          </span><span class="annot"><span class="annottext">[IfaceIdExtras] -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_id_extras_s"><span class="hs-identifier hs-var">ppr_id_extras_s</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177176"><span class="hs-identifier hs-var">stuff</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177175"><span class="hs-identifier hs-var">defms</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1279"></span><span>
</span><span id="line-1280"></span><span class="annot"><a href="GHC.Iface.Recomp.html#ppr_insts"><span class="hs-identifier hs-type">ppr_insts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceInstABI"><span class="hs-identifier hs-type">IfaceInstABI</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1281"></span><span id="ppr_insts"><span class="annot"><span class="annottext">ppr_insts :: [IfaceTopBndr] -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_insts"><span class="hs-identifier hs-var hs-var">ppr_insts</span></a></span></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&lt;insts&gt;&quot;</span></span><span>
</span><span id="line-1282"></span><span>
</span><span id="line-1283"></span><span class="annot"><a href="GHC.Iface.Recomp.html#ppr_id_extras_s"><span class="hs-identifier hs-type">ppr_id_extras_s</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1284"></span><span id="ppr_id_extras_s"><span class="annot"><span class="annottext">ppr_id_extras_s :: [IfaceIdExtras] -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_id_extras_s"><span class="hs-identifier hs-var hs-var">ppr_id_extras_s</span></a></span></span><span> </span><span id="local-6989586621681177174"><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177174"><span class="hs-identifier hs-var">stuff</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceIdExtras -&gt; SDoc) -&gt; [IfaceIdExtras] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_id_extras"><span class="hs-identifier hs-var">ppr_id_extras</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177174"><span class="hs-identifier hs-var">stuff</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1285"></span><span>
</span><span id="line-1286"></span><span class="annot"><a href="GHC.Iface.Recomp.html#ppr_id_extras"><span class="hs-identifier hs-type">ppr_id_extras</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1287"></span><span id="ppr_id_extras"><span class="annot"><span class="annottext">ppr_id_extras :: IfaceIdExtras -&gt; SDoc
</span><a href="GHC.Iface.Recomp.html#ppr_id_extras"><span class="hs-identifier hs-var hs-var">ppr_id_extras</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IdExtras"><span class="hs-identifier hs-type">IdExtras</span></a></span><span> </span><span id="local-6989586621681177173"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177173"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177172"><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177172"><span class="hs-identifier hs-var">rules</span></a></span></span><span> </span><span id="local-6989586621681177171"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177171"><span class="hs-identifier hs-var">anns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Fixity -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177173"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceRule -&gt; SDoc) -&gt; [IfaceRule] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceRule -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177172"><span class="hs-identifier hs-var">rules</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(AnnPayload -&gt; SDoc) -&gt; [AnnPayload] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">AnnPayload -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177171"><span class="hs-identifier hs-var">anns</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1288"></span><span>
</span><span id="line-1289"></span><span class="hs-comment">-- This instance is used only to compute fingerprints</span><span>
</span><span id="line-1290"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681177168"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclExtras"><span class="hs-identifier hs-type">IfaceDeclExtras</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1291"></span><span>  </span><span id="local-6989586621681177165"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO IfaceDeclExtras
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621681177163"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177163"><span class="hs-identifier hs-var">_bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO IfaceDeclExtras
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;no get for IfaceDeclExtras&quot;</span></span><span>
</span><span id="line-1292"></span><span>  </span><span id="local-6989586621681177121"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; IfaceDeclExtras -&gt; IO ()
</span><a href="#local-6989586621681177121"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621681177120"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177120"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span><span> </span><span id="local-6989586621681177119"><span class="annot"><span class="annottext">IfaceIdExtras
</span><a href="#local-6989586621681177119"><span class="hs-identifier hs-var">extras</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1293"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177120"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IfaceIdExtras -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177120"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras
</span><a href="#local-6989586621681177119"><span class="hs-identifier hs-var">extras</span></a></span><span>
</span><span id="line-1294"></span><span>  </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621681177117"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177117"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDataExtras"><span class="hs-identifier hs-type">IfaceDataExtras</span></a></span><span> </span><span id="local-6989586621681177116"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177116"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177115"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177115"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span id="local-6989586621681177114"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177114"><span class="hs-identifier hs-var">anns</span></a></span></span><span> </span><span id="local-6989586621681177113"><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177113"><span class="hs-identifier hs-var">cons</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1295"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177117"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">2</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Maybe Fixity -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177117"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177116"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [IfaceTopBndr] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177117"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177115"><span class="hs-identifier hs-var">insts</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [AnnPayload] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177117"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177114"><span class="hs-identifier hs-var">anns</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [IfaceIdExtras] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177117"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177113"><span class="hs-identifier hs-var">cons</span></a></span><span>
</span><span id="line-1296"></span><span>  </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621681177112"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177112"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceClassExtras"><span class="hs-identifier hs-type">IfaceClassExtras</span></a></span><span> </span><span id="local-6989586621681177111"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177111"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177110"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177110"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span id="local-6989586621681177109"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177109"><span class="hs-identifier hs-var">anns</span></a></span></span><span> </span><span id="local-6989586621681177108"><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177108"><span class="hs-identifier hs-var">methods</span></a></span></span><span> </span><span id="local-6989586621681177107"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177107"><span class="hs-identifier hs-var">defms</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1297"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177112"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">3</span></span><span>
</span><span id="line-1298"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; Maybe Fixity -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177112"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177111"><span class="hs-identifier hs-var">fix</span></a></span><span>
</span><span id="line-1299"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; [IfaceTopBndr] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177112"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177110"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-1300"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; [AnnPayload] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177112"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177109"><span class="hs-identifier hs-var">anns</span></a></span><span>
</span><span id="line-1301"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; [IfaceIdExtras] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177112"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177108"><span class="hs-identifier hs-var">methods</span></a></span><span>
</span><span id="line-1302"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; [IfaceTopBndr] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177112"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177107"><span class="hs-identifier hs-var">defms</span></a></span><span>
</span><span id="line-1303"></span><span>  </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621681177106"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177106"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceSynonymExtras"><span class="hs-identifier hs-type">IfaceSynonymExtras</span></a></span><span> </span><span id="local-6989586621681177105"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177105"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177104"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177104"><span class="hs-identifier hs-var">anns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1304"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177106"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">4</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Maybe Fixity -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177106"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177105"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [AnnPayload] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177106"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177104"><span class="hs-identifier hs-var">anns</span></a></span><span>
</span><span id="line-1305"></span><span>  </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621681177103"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177103"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceFamilyExtras"><span class="hs-identifier hs-type">IfaceFamilyExtras</span></a></span><span> </span><span id="local-6989586621681177102"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177102"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177101"><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177101"><span class="hs-identifier hs-var">finsts</span></a></span></span><span> </span><span id="local-6989586621681177100"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177100"><span class="hs-identifier hs-var">anns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1306"></span><span>   </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177103"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">5</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Maybe Fixity -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177103"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177102"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [IfaceTopBndr] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177103"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177101"><span class="hs-identifier hs-var">finsts</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [AnnPayload] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177103"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177100"><span class="hs-identifier hs-var">anns</span></a></span><span>
</span><span id="line-1307"></span><span>  </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621681177099"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177099"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceOtherDeclExtras"><span class="hs-identifier hs-var">IfaceOtherDeclExtras</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177099"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">6</span></span><span>
</span><span id="line-1308"></span><span>
</span><span id="line-1309"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681177096"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-type">IfaceIdExtras</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1310"></span><span>  </span><span id="local-6989586621681177094"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO IfaceIdExtras
</span><a href="#local-6989586621681177094"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621681177093"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177093"><span class="hs-identifier hs-var">_bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO IfaceIdExtras
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;no get for IfaceIdExtras&quot;</span></span><span>
</span><span id="line-1311"></span><span>  </span><span id="local-6989586621681177086"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; IfaceIdExtras -&gt; IO ()
</span><a href="#local-6989586621681177086"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621681177085"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177085"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Recomp.html#IdExtras"><span class="hs-identifier hs-type">IdExtras</span></a></span><span> </span><span id="local-6989586621681177084"><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177084"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681177083"><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177083"><span class="hs-identifier hs-var">rules</span></a></span></span><span> </span><span id="local-6989586621681177082"><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177082"><span class="hs-identifier hs-var">anns</span></a></span></span><span class="hs-special">)</span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Maybe Fixity -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177085"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Fixity
</span><a href="#local-6989586621681177084"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [IfaceRule] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177085"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681177083"><span class="hs-identifier hs-var">rules</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [AnnPayload] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621681177085"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload]
</span><a href="#local-6989586621681177082"><span class="hs-identifier hs-var">anns</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1312"></span><span>
</span><span id="line-1313"></span><span class="annot"><a href="GHC.Iface.Recomp.html#declExtras"><span class="hs-identifier hs-type">declExtras</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1314"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Annotations.html#AnnPayload"><span class="hs-identifier hs-type">AnnPayload</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1315"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceRule"><span class="hs-identifier hs-type">IfaceRule</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1316"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceClsInst"><span class="hs-identifier hs-type">IfaceClsInst</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1317"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceFamInst"><span class="hs-identifier hs-type">IfaceFamInst</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1318"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Type.html#IfExtName"><span class="hs-identifier hs-type">IfExtName</span></a></span><span>          </span><span class="hs-comment">-- lookup default method names</span><span>
</span><span id="line-1319"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span>
</span><span id="line-1320"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html#IfaceDeclExtras"><span class="hs-identifier hs-type">IfaceDeclExtras</span></a></span><span>
</span><span id="line-1321"></span><span>
</span><span id="line-1322"></span><span id="declExtras"><span class="annot"><span class="annottext">declExtras :: (OccName -&gt; Maybe Fixity)
-&gt; (OccName -&gt; [AnnPayload])
-&gt; OccEnv [IfaceRule]
-&gt; OccEnv [IfaceClsInst]
-&gt; OccEnv [IfaceFamInst]
-&gt; OccEnv IfaceTopBndr
-&gt; IfaceDecl
-&gt; IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#declExtras"><span class="hs-identifier hs-var hs-var">declExtras</span></a></span></span><span> </span><span id="local-6989586621681177081"><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177081"><span class="hs-identifier hs-var">fix_fn</span></a></span></span><span> </span><span id="local-6989586621681177080"><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177080"><span class="hs-identifier hs-var">ann_fn</span></a></span></span><span> </span><span id="local-6989586621681177079"><span class="annot"><span class="annottext">OccEnv [IfaceRule]
</span><a href="#local-6989586621681177079"><span class="hs-identifier hs-var">rule_env</span></a></span></span><span> </span><span id="local-6989586621681177078"><span class="annot"><span class="annottext">OccEnv [IfaceClsInst]
</span><a href="#local-6989586621681177078"><span class="hs-identifier hs-var">inst_env</span></a></span></span><span> </span><span id="local-6989586621681177077"><span class="annot"><span class="annottext">OccEnv [IfaceFamInst]
</span><a href="#local-6989586621681177077"><span class="hs-identifier hs-var">fi_env</span></a></span></span><span> </span><span id="local-6989586621681177076"><span class="annot"><span class="annottext">OccEnv IfaceTopBndr
</span><a href="#local-6989586621681177076"><span class="hs-identifier hs-var">dm_env</span></a></span></span><span> </span><span id="local-6989586621681177075"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177075"><span class="hs-identifier hs-var">decl</span></a></span></span><span>
</span><span id="line-1323"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177075"><span class="hs-identifier hs-var">decl</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1324"></span><span>      </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceId"><span class="hs-identifier hs-type">IfaceId</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IfaceIdExtras -&gt; IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceIdExtras"><span class="hs-identifier hs-var">IfaceIdExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; IfaceIdExtras
</span><a href="#local-6989586621681177074"><span class="hs-identifier hs-var">id_extras</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1325"></span><span>      </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceData"><span class="hs-identifier hs-type">IfaceData</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ifCons :: IfaceDecl -&gt; IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#ifCons"><span class="hs-identifier hs-var">ifCons</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681177070"><span class="annot"><span class="annottext">IfaceConDecls
</span><a href="#local-6989586621681177070"><span class="hs-identifier hs-var">cons</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1326"></span><span>                     </span><span class="annot"><span class="annottext">Maybe Fixity
-&gt; [IfaceTopBndr]
-&gt; [AnnPayload]
-&gt; [IfaceIdExtras]
-&gt; IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceDataExtras"><span class="hs-identifier hs-var">IfaceDataExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177081"><span class="hs-identifier hs-var">fix_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1327"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceFamInst -&gt; IfaceTopBndr) -&gt; [IfaceFamInst] -&gt; [IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#ifFamInstAxiom"><span class="hs-identifier hs-var hs-var">ifFamInstAxiom</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv [IfaceFamInst] -&gt; OccName -&gt; [IfaceFamInst]
forall v. OccEnv [v] -&gt; OccName -&gt; [v]
</span><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-var">lookupOccEnvL</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceFamInst]
</span><a href="#local-6989586621681177077"><span class="hs-identifier hs-var">fi_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr] -&gt; [IfaceTopBndr] -&gt; [IfaceTopBndr]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-1328"></span><span>                         </span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; IfaceTopBndr) -&gt; [IfaceClsInst] -&gt; [IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#ifDFun"><span class="hs-identifier hs-var hs-var">ifDFun</span></a></span><span>         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv [IfaceClsInst] -&gt; OccName -&gt; [IfaceClsInst]
forall v. OccEnv [v] -&gt; OccName -&gt; [v]
</span><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-var">lookupOccEnvL</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceClsInst]
</span><a href="#local-6989586621681177078"><span class="hs-identifier hs-var">inst_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1329"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177080"><span class="hs-identifier hs-var">ann_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1330"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceConDecl -&gt; IfaceIdExtras)
-&gt; [IfaceConDecl] -&gt; [IfaceIdExtras]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; IfaceIdExtras
</span><a href="#local-6989586621681177074"><span class="hs-identifier hs-var">id_extras</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; IfaceIdExtras)
-&gt; (IfaceConDecl -&gt; OccName) -&gt; IfaceConDecl -&gt; IfaceIdExtras
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; OccName
forall name. HasOccName name =&gt; name -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#occName"><span class="hs-identifier hs-var">occName</span></a></span><span> </span><span class="annot"><span class="annottext">(IfaceTopBndr -&gt; OccName)
-&gt; (IfaceConDecl -&gt; IfaceTopBndr) -&gt; IfaceConDecl -&gt; OccName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceConDecl -&gt; IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#ifConName"><span class="hs-identifier hs-var hs-var">ifConName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceConDecls -&gt; [IfaceConDecl]
</span><a href="GHC.Iface.Syntax.html#visibleIfConDecls"><span class="hs-identifier hs-var">visibleIfConDecls</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceConDecls
</span><a href="#local-6989586621681177070"><span class="hs-identifier hs-var">cons</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1331"></span><span>      </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceClass"><span class="hs-identifier hs-type">IfaceClass</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ifBody :: IfaceDecl -&gt; IfaceClassBody
</span><a href="GHC.Iface.Syntax.html#ifBody"><span class="hs-identifier hs-var">ifBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfConcreteClass"><span class="hs-identifier hs-type">IfConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifSigs :: IfaceClassBody -&gt; [IfaceClassOp]
</span><a href="GHC.Iface.Syntax.html#ifSigs"><span class="hs-identifier hs-var">ifSigs</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681177060"><span class="annot"><span class="annottext">[IfaceClassOp]
</span><a href="#local-6989586621681177060"><span class="hs-identifier hs-var">sigs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifATs :: IfaceClassBody -&gt; [IfaceAT]
</span><a href="GHC.Iface.Syntax.html#ifATs"><span class="hs-identifier hs-var">ifATs</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681177058"><span class="annot"><span class="annottext">[IfaceAT]
</span><a href="#local-6989586621681177058"><span class="hs-identifier hs-var">ats</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1332"></span><span>                     </span><span class="annot"><span class="annottext">Maybe Fixity
-&gt; [IfaceTopBndr]
-&gt; [AnnPayload]
-&gt; [IfaceIdExtras]
-&gt; [IfaceTopBndr]
-&gt; IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceClassExtras"><span class="hs-identifier hs-var">IfaceClassExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177081"><span class="hs-identifier hs-var">fix_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177057"><span class="hs-identifier hs-var">insts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177080"><span class="hs-identifier hs-var">ann_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[IfaceIdExtras]
</span><a href="#local-6989586621681177056"><span class="hs-identifier hs-var">meths</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceTopBndr]
</span><a href="#local-6989586621681177055"><span class="hs-identifier hs-var">defms</span></a></span><span>
</span><span id="line-1333"></span><span>          </span><span class="hs-keyword">where</span><span>
</span><span id="line-1334"></span><span>            </span><span id="local-6989586621681177057"><span class="annot"><span class="annottext">insts :: [IfaceTopBndr]
</span><a href="#local-6989586621681177057"><span class="hs-identifier hs-var hs-var">insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; IfaceTopBndr) -&gt; [IfaceClsInst] -&gt; [IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#ifDFun"><span class="hs-identifier hs-var hs-var">ifDFun</span></a></span><span> </span><span class="annot"><span class="annottext">([IfaceClsInst] -&gt; [IfaceTopBndr])
-&gt; [IfaceClsInst] -&gt; [IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceAT -&gt; [IfaceClsInst]) -&gt; [IfaceAT] -&gt; [IfaceClsInst]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceAT -&gt; [IfaceClsInst]
</span><a href="#local-6989586621681177052"><span class="hs-identifier hs-var">at_extras</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceAT]
</span><a href="#local-6989586621681177058"><span class="hs-identifier hs-var">ats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1335"></span><span>                                    </span><span class="annot"><span class="annottext">[IfaceClsInst] -&gt; [IfaceClsInst] -&gt; [IfaceClsInst]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceClsInst] -&gt; OccName -&gt; [IfaceClsInst]
forall v. OccEnv [v] -&gt; OccName -&gt; [v]
</span><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-var">lookupOccEnvL</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceClsInst]
</span><a href="#local-6989586621681177078"><span class="hs-identifier hs-var">inst_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1336"></span><span>                           </span><span class="hs-comment">-- Include instances of the associated types</span><span>
</span><span id="line-1337"></span><span>                           </span><span class="hs-comment">-- as well as instances of the class (#5147)</span><span>
</span><span id="line-1338"></span><span>            </span><span id="local-6989586621681177056"><span class="annot"><span class="annottext">meths :: [IfaceIdExtras]
</span><a href="#local-6989586621681177056"><span class="hs-identifier hs-var hs-var">meths</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">OccName -&gt; IfaceIdExtras
</span><a href="#local-6989586621681177074"><span class="hs-identifier hs-var">id_extras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177050"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceClassOp"><span class="hs-identifier hs-type">IfaceClassOp</span></a></span><span> </span><span id="local-6989586621681177050"><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177050"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe (DefMethSpec IfaceType)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfaceClassOp]
</span><a href="#local-6989586621681177060"><span class="hs-identifier hs-var">sigs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1339"></span><span>            </span><span class="hs-comment">-- Names of all the default methods (see Note [default method Name])</span><span>
</span><span id="line-1340"></span><span>            </span><span id="local-6989586621681177055"><span class="annot"><span class="annottext">defms :: [IfaceTopBndr]
</span><a href="#local-6989586621681177055"><span class="hs-identifier hs-var hs-var">defms</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177048"><span class="hs-identifier hs-var">dmName</span></a></span><span>
</span><span id="line-1341"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceClassOp"><span class="hs-identifier hs-type">IfaceClassOp</span></a></span><span> </span><span id="local-6989586621681177047"><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177047"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DefMethSpec IfaceType
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfaceClassOp]
</span><a href="#local-6989586621681177060"><span class="hs-identifier hs-var">sigs</span></a></span><span>
</span><span id="line-1342"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681177046"><span class="annot"><span class="annottext">dmOcc :: OccName
</span><a href="#local-6989586621681177046"><span class="hs-identifier hs-var hs-var">dmOcc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkDefaultMethodOcc"><span class="hs-identifier hs-var">mkDefaultMethodOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177047"><span class="hs-identifier hs-var">bndr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1343"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681177048"><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177048"><span class="hs-identifier hs-var">dmName</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">OccEnv IfaceTopBndr -&gt; OccName -&gt; Maybe IfaceTopBndr
forall a. OccEnv a -&gt; OccName -&gt; Maybe a
</span><a href="GHC.Types.Name.Occurrence.html#lookupOccEnv"><span class="hs-identifier hs-var">lookupOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv IfaceTopBndr
</span><a href="#local-6989586621681177076"><span class="hs-identifier hs-var">dm_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177046"><span class="hs-identifier hs-var">dmOcc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1344"></span><span>      </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceSynonym"><span class="hs-identifier hs-type">IfaceSynonym</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Fixity -&gt; [AnnPayload] -&gt; IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceSynonymExtras"><span class="hs-identifier hs-var">IfaceSynonymExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177081"><span class="hs-identifier hs-var">fix_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1345"></span><span>                                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177080"><span class="hs-identifier hs-var">ann_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1346"></span><span>      </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceFamily"><span class="hs-identifier hs-type">IfaceFamily</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Fixity -&gt; [IfaceTopBndr] -&gt; [AnnPayload] -&gt; IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceFamilyExtras"><span class="hs-identifier hs-var">IfaceFamilyExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177081"><span class="hs-identifier hs-var">fix_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1347"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceFamInst -&gt; IfaceTopBndr) -&gt; [IfaceFamInst] -&gt; [IfaceTopBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; IfaceTopBndr
</span><a href="GHC.Iface.Syntax.html#ifFamInstAxiom"><span class="hs-identifier hs-var hs-var">ifFamInstAxiom</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv [IfaceFamInst] -&gt; OccName -&gt; [IfaceFamInst]
forall v. OccEnv [v] -&gt; OccName -&gt; [v]
</span><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-var">lookupOccEnvL</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceFamInst]
</span><a href="#local-6989586621681177077"><span class="hs-identifier hs-var">fi_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1348"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177080"><span class="hs-identifier hs-var">ann_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1349"></span><span>      </span><span id="local-6989586621681177042"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177042"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IfaceDeclExtras
</span><a href="GHC.Iface.Recomp.html#IfaceOtherDeclExtras"><span class="hs-identifier hs-var">IfaceOtherDeclExtras</span></a></span><span>
</span><span id="line-1350"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1351"></span><span>        </span><span id="local-6989586621681177073"><span class="annot"><span class="annottext">n :: OccName
</span><a href="#local-6989586621681177073"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177075"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-1352"></span><span>        </span><span id="local-6989586621681177074"><span class="annot"><span class="annottext">id_extras :: OccName -&gt; IfaceIdExtras
</span><a href="#local-6989586621681177074"><span class="hs-identifier hs-var hs-var">id_extras</span></a></span></span><span> </span><span id="local-6989586621681177040"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177040"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Fixity -&gt; [IfaceRule] -&gt; [AnnPayload] -&gt; IfaceIdExtras
</span><a href="GHC.Iface.Recomp.html#IdExtras"><span class="hs-identifier hs-var">IdExtras</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Maybe Fixity
</span><a href="#local-6989586621681177081"><span class="hs-identifier hs-var">fix_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177040"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv [IfaceRule] -&gt; OccName -&gt; [IfaceRule]
forall v. OccEnv [v] -&gt; OccName -&gt; [v]
</span><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-var">lookupOccEnvL</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceRule]
</span><a href="#local-6989586621681177079"><span class="hs-identifier hs-var">rule_env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177040"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; [AnnPayload]
</span><a href="#local-6989586621681177080"><span class="hs-identifier hs-var">ann_fn</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177040"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1353"></span><span>        </span><span id="local-6989586621681177052"><span class="annot"><span class="annottext">at_extras :: IfaceAT -&gt; [IfaceClsInst]
</span><a href="#local-6989586621681177052"><span class="hs-identifier hs-var hs-var">at_extras</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAT"><span class="hs-identifier hs-type">IfaceAT</span></a></span><span> </span><span id="local-6989586621681177037"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177037"><span class="hs-identifier hs-var">decl</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe IfaceType
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceClsInst] -&gt; OccName -&gt; [IfaceClsInst]
forall v. OccEnv [v] -&gt; OccName -&gt; [v]
</span><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-var">lookupOccEnvL</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [IfaceClsInst]
</span><a href="#local-6989586621681177078"><span class="hs-identifier hs-var">inst_env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDecl -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681177037"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1354"></span><span>
</span><span id="line-1355"></span><span>
</span><span id="line-1356"></span><span class="hs-comment">{- Note [default method Name] (see also #15970)

The Names for the default methods aren't available in Iface syntax.

* We originally start with a DefMethInfo from the class, contain a
  Name for the default method

* We turn that into Iface syntax as a DefMethSpec which lacks a Name
  entirely. Why? Because the Name can be derived from the method name
  (in GHC.IfaceToCore), so doesn't need to be serialised into the interface
  file.

But now we have to get the Name back, because the class declaration's
fingerprint needs to depend on it (this was the bug in #15970).  This
is done in a slightly convoluted way:

* Then, in addFingerprints we build a map that maps OccNames to Names

* We pass that map to declExtras which laboriously looks up in the map
  (using the derived occurrence name) to recover the Name we have just
  thrown away.
-}</span><span>
</span><span id="line-1378"></span><span>
</span><span id="line-1379"></span><span id="local-6989586621681178185"><span class="annot"><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-type">lookupOccEnvL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681178185"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681178185"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-1380"></span><span id="lookupOccEnvL"><span class="annot"><span class="annottext">lookupOccEnvL :: forall v. OccEnv [v] -&gt; OccName -&gt; [v]
</span><a href="GHC.Iface.Recomp.html#lookupOccEnvL"><span class="hs-identifier hs-var hs-var">lookupOccEnvL</span></a></span></span><span> </span><span id="local-6989586621681177036"><span class="annot"><span class="annottext">OccEnv [v]
</span><a href="#local-6989586621681177036"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681177035"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177035"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccEnv [v] -&gt; OccName -&gt; Maybe [v]
forall a. OccEnv a -&gt; OccName -&gt; Maybe a
</span><a href="GHC.Types.Name.Occurrence.html#lookupOccEnv"><span class="hs-identifier hs-var">lookupOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [v]
</span><a href="#local-6989586621681177036"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177035"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [v] -&gt; [v] -&gt; [v]
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1381"></span><span>
</span><span id="line-1382"></span><span class="hs-comment">{-
-- for testing: use the md5sum command to generate fingerprints and
-- compare the results against our built-in version.
  fp' &lt;- oldMD5 dflags bh
  if fp /= fp' then pprPanic &quot;computeFingerprint&quot; (ppr fp &lt;+&gt; ppr fp')
               else return fp

oldMD5 dflags bh = do
  tmp &lt;- newTempName dflags CurrentModule &quot;bin&quot;
  writeBinMem bh tmp
  tmp2 &lt;- newTempName dflags CurrentModule &quot;md5&quot;
  let cmd = &quot;md5sum &quot; ++ tmp ++ &quot; &gt;&quot; ++ tmp2
  r &lt;- system cmd
  case r of
    ExitFailure _ -&gt; throwGhcExceptionIO (PhaseFailed cmd r)
    ExitSuccess -&gt; do
        hash_str &lt;- readFile tmp2
        return $! readHexFingerprint hash_str
-}</span><span>
</span><span id="line-1401"></span><span>
</span><span id="line-1402"></span><span class="hs-comment">----------------------</span><span>
</span><span id="line-1403"></span><span class="hs-comment">-- mkOrphMap partitions instance decls or rules into</span><span>
</span><span id="line-1404"></span><span class="hs-comment">--      (a) an OccEnv for ones that are not orphans,</span><span>
</span><span id="line-1405"></span><span class="hs-comment">--          mapping the local OccName to a list of its decls</span><span>
</span><span id="line-1406"></span><span class="hs-comment">--      (b) a list of orphan decls</span><span>
</span><span id="line-1407"></span><span id="local-6989586621681178203"><span class="annot"><a href="GHC.Iface.Recomp.html#mkOrphMap"><span class="hs-identifier hs-type">mkOrphMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681178203"><span class="hs-identifier hs-type">decl</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#IsOrphan"><span class="hs-identifier hs-type">IsOrphan</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Extract orphan status from decl</span><span>
</span><span id="line-1408"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681178203"><span class="hs-identifier hs-type">decl</span></a></span><span class="hs-special">]</span><span>             </span><span class="hs-comment">-- Sorted into canonical order</span><span>
</span><span id="line-1409"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccEnv"><span class="hs-identifier hs-type">OccEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681178203"><span class="hs-identifier hs-type">decl</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>    </span><span class="hs-comment">-- Non-orphan decls associated with their key;</span><span>
</span><span id="line-1410"></span><span>                                </span><span class="hs-comment">--      each sublist in canonical order</span><span>
</span><span id="line-1411"></span><span>              </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681178203"><span class="hs-identifier hs-type">decl</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>           </span><span class="hs-comment">-- Orphan decls; in canonical order</span><span>
</span><span id="line-1412"></span><span id="mkOrphMap"><span class="annot"><span class="annottext">mkOrphMap :: forall decl.
(decl -&gt; IsOrphan) -&gt; [decl] -&gt; (OccEnv [decl], [decl])
</span><a href="GHC.Iface.Recomp.html#mkOrphMap"><span class="hs-identifier hs-var hs-var">mkOrphMap</span></a></span></span><span> </span><span id="local-6989586621681177033"><span class="annot"><span class="annottext">decl -&gt; IsOrphan
</span><a href="#local-6989586621681177033"><span class="hs-identifier hs-var">get_key</span></a></span></span><span> </span><span id="local-6989586621681177032"><span class="annot"><span class="annottext">[decl]
</span><a href="#local-6989586621681177032"><span class="hs-identifier hs-var">decls</span></a></span></span><span>
</span><span id="line-1413"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((OccEnv [decl], [decl]) -&gt; decl -&gt; (OccEnv [decl], [decl]))
-&gt; (OccEnv [decl], [decl]) -&gt; [decl] -&gt; (OccEnv [decl], [decl])
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">(OccEnv [decl], [decl]) -&gt; decl -&gt; (OccEnv [decl], [decl])
</span><a href="#local-6989586621681177031"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv [decl]
forall a. OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#emptyOccEnv"><span class="hs-identifier hs-var">emptyOccEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[decl]
</span><a href="#local-6989586621681177032"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-1414"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1415"></span><span>    </span><span id="local-6989586621681177031"><span class="annot"><span class="annottext">go :: (OccEnv [decl], [decl]) -&gt; decl -&gt; (OccEnv [decl], [decl])
</span><a href="#local-6989586621681177031"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681177030"><span class="annot"><span class="annottext">OccEnv [decl]
</span><a href="#local-6989586621681177030"><span class="hs-identifier hs-var">non_orphs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681177029"><span class="annot"><span class="annottext">[decl]
</span><a href="#local-6989586621681177029"><span class="hs-identifier hs-var">orphs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681177028"><span class="annot"><span class="annottext">decl
</span><a href="#local-6989586621681177028"><span class="hs-identifier hs-var">d</span></a></span></span><span>
</span><span id="line-1416"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Core.html#NotOrphan"><span class="hs-identifier hs-type">NotOrphan</span></a></span><span> </span><span id="local-6989586621681177026"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177026"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">decl -&gt; IsOrphan
</span><a href="#local-6989586621681177033"><span class="hs-identifier hs-var">get_key</span></a></span><span> </span><span class="annot"><span class="annottext">decl
</span><a href="#local-6989586621681177028"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-1417"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(decl -&gt; [decl] -&gt; [decl])
-&gt; (decl -&gt; [decl])
-&gt; OccEnv [decl]
-&gt; OccName
-&gt; decl
-&gt; OccEnv [decl]
forall a b.
(a -&gt; b -&gt; b) -&gt; (a -&gt; b) -&gt; OccEnv b -&gt; OccName -&gt; a -&gt; OccEnv b
</span><a href="GHC.Types.Name.Occurrence.html#extendOccEnv_Acc"><span class="hs-identifier hs-var">extendOccEnv_Acc</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">:</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">decl -&gt; [decl]
forall a. a -&gt; [a]
</span><a href="GHC.Utils.Misc.html#singleton"><span class="hs-identifier hs-var">Utils.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [decl]
</span><a href="#local-6989586621681177030"><span class="hs-identifier hs-var">non_orphs</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177026"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">decl
</span><a href="#local-6989586621681177028"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[decl]
</span><a href="#local-6989586621681177029"><span class="hs-identifier hs-var">orphs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1418"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccEnv [decl]
</span><a href="#local-6989586621681177030"><span class="hs-identifier hs-var">non_orphs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">decl
</span><a href="#local-6989586621681177028"><span class="hs-identifier hs-var">d</span></a></span><span class="annot"><span class="annottext">decl -&gt; [decl] -&gt; [decl]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[decl]
</span><a href="#local-6989586621681177029"><span class="hs-identifier hs-var">orphs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1419"></span><span>
</span><span id="line-1420"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-1421"></span><span class="hs-comment">-- Look up parents and versions of Names</span><span>
</span><span id="line-1422"></span><span>
</span><span id="line-1423"></span><span class="hs-comment">-- This is like a global version of the mi_hash_fn field in each ModIface.</span><span>
</span><span id="line-1424"></span><span class="hs-comment">-- Given a Name, it finds the ModIface, and then uses mi_hash_fn to get</span><span>
</span><span id="line-1425"></span><span class="hs-comment">-- the parent and version info.</span><span>
</span><span id="line-1426"></span><span>
</span><span id="line-1427"></span><span class="annot"><a href="GHC.Iface.Recomp.html#mkHashFun"><span class="hs-identifier hs-type">mkHashFun</span></a></span><span>
</span><span id="line-1428"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>                       </span><span class="hs-comment">-- needed to look up versions</span><span>
</span><span id="line-1429"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ExternalPackageState"><span class="hs-identifier hs-type">ExternalPackageState</span></a></span><span>         </span><span class="hs-comment">-- ditto</span><span>
</span><span id="line-1430"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1431"></span><span id="mkHashFun"><span class="annot"><span class="annottext">mkHashFun :: HscEnv -&gt; ExternalPackageState -&gt; IfaceTopBndr -&gt; IO Fingerprint
</span><a href="GHC.Iface.Recomp.html#mkHashFun"><span class="hs-identifier hs-var hs-var">mkHashFun</span></a></span></span><span> </span><span id="local-6989586621681177023"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177023"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681177022"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177022"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span id="local-6989586621681177021"><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177021"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-1432"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
forall u. GenModule (GenUnit u) -&gt; Bool
</span><a href="GHC.Unit.Module.html#isHoleModule"><span class="hs-identifier hs-var">isHoleModule</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177020"><span class="hs-identifier hs-var">orig_mod</span></a></span><span>
</span><span id="line-1433"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; IO Fingerprint
</span><a href="#local-6989586621681177019"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ModuleName -&gt; Module
</span><a href="GHC.Driver.Session.html#mkHomeModule"><span class="hs-identifier hs-var">mkHomeModule</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681177017"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177020"><span class="hs-identifier hs-var">orig_mod</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1434"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1435"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; IO Fingerprint
</span><a href="#local-6989586621681177019"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681177020"><span class="hs-identifier hs-var">orig_mod</span></a></span><span>
</span><span id="line-1436"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1437"></span><span>      </span><span id="local-6989586621681177017"><span class="annot"><span class="annottext">dflags :: DynFlags
</span><a href="#local-6989586621681177017"><span class="hs-identifier hs-var hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177023"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-1438"></span><span>      </span><span id="local-6989586621681177016"><span class="annot"><span class="annottext">hpt :: HomePackageTable
</span><a href="#local-6989586621681177016"><span class="hs-identifier hs-var hs-var">hpt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; HomePackageTable
</span><a href="GHC.Driver.Types.html#hsc_HPT"><span class="hs-identifier hs-var hs-var">hsc_HPT</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177023"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-1439"></span><span>      </span><span id="local-6989586621681177015"><span class="annot"><span class="annottext">pit :: PackageIfaceTable
</span><a href="#local-6989586621681177015"><span class="hs-identifier hs-var hs-var">pit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var hs-var">eps_PIT</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681177022"><span class="hs-identifier hs-var">eps</span></a></span><span>
</span><span id="line-1440"></span><span>      </span><span id="local-6989586621681177014"><span class="annot"><span class="annottext">occ :: OccName
</span><a href="#local-6989586621681177014"><span class="hs-identifier hs-var hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177021"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-1441"></span><span>      </span><span id="local-6989586621681177020"><span class="annot"><span class="annottext">orig_mod :: Module
</span><a href="#local-6989586621681177020"><span class="hs-identifier hs-var hs-var">orig_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IfaceTopBndr -&gt; Module
IfaceTopBndr -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTopBndr
</span><a href="#local-6989586621681177021"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-1442"></span><span>      </span><span id="local-6989586621681177019"><span class="annot"><span class="annottext">lookup :: Module -&gt; IO Fingerprint
</span><a href="#local-6989586621681177019"><span class="hs-identifier hs-var hs-var">lookup</span></a></span></span><span> </span><span id="local-6989586621681176998"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176998"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1443"></span><span>        </span><span class="hs-identifier">MASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">name</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1444"></span><span>        </span><span id="local-6989586621681176997"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176997"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HomePackageTable -&gt; PackageIfaceTable -&gt; Module -&gt; Maybe ModIface
</span><a href="GHC.Driver.Types.html#lookupIfaceByModule"><span class="hs-identifier hs-var">lookupIfaceByModule</span></a></span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681177016"><span class="hs-identifier hs-var">hpt</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIfaceTable
</span><a href="#local-6989586621681177015"><span class="hs-identifier hs-var">pit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176998"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1445"></span><span>                  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176996"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176996"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; IO ModIface
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176996"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-1446"></span><span>                  </span><span class="annot"><span class="annottext">Maybe ModIface
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1447"></span><span>                      </span><span class="hs-comment">-- This can occur when we're writing out ifaces for</span><span>
</span><span id="line-1448"></span><span>                      </span><span class="hs-comment">-- requirements; we didn't do any /real/ typechecking</span><span>
</span><span id="line-1449"></span><span>                      </span><span class="hs-comment">-- so there's no guarantee everything is loaded.</span><span>
</span><span id="line-1450"></span><span>                      </span><span class="hs-comment">-- Kind of a heinous hack.</span><span>
</span><span id="line-1451"></span><span>                      </span><span id="local-6989586621681176995"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176995"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; IfG ModIface -&gt; IO ModIface
forall a. HscEnv -&gt; IfG a -&gt; IO a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceLoad"><span class="hs-identifier hs-var">initIfaceLoad</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681177023"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">(IfG ModIface -&gt; IO ModIface)
-&gt; (IfM () (MaybeErr SDoc ModIface) -&gt; IfG ModIface)
-&gt; IfM () (MaybeErr SDoc ModIface)
-&gt; IO ModIface
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfM () (MaybeErr SDoc ModIface) -&gt; IfG ModIface
forall gbl lcl a.
TcRnIf gbl lcl (MaybeErr SDoc a) -&gt; TcRnIf gbl lcl a
</span><a href="GHC.Tc.Utils.Monad.html#withException"><span class="hs-identifier hs-var">withException</span></a></span><span>
</span><span id="line-1452"></span><span>                            </span><span class="annot"><span class="annottext">(IfM () (MaybeErr SDoc ModIface) -&gt; IO ModIface)
-&gt; IfM () (MaybeErr SDoc ModIface) -&gt; IO ModIface
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Module -&gt; WhereFrom -&gt; IfM () (MaybeErr SDoc ModIface)
forall lcl.
SDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr SDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var">loadInterface</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lookupVers2&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176998"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportBySystem"><span class="hs-identifier hs-var">ImportBySystem</span></a></span><span>
</span><span id="line-1453"></span><span>                      </span><span class="annot"><span class="annottext">ModIface -&gt; IO ModIface
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176995"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-1454"></span><span>        </span><span class="annot"><span class="annottext">Fingerprint -&gt; IO Fingerprint
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Fingerprint -&gt; IO Fingerprint) -&gt; Fingerprint -&gt; IO Fingerprint
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName, Fingerprint) -&gt; Fingerprint
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; OccName -&gt; Maybe (OccName, Fingerprint)
</span><a href="GHC.Driver.Types.html#mi_hash_fn"><span class="hs-identifier hs-var hs-var">mi_hash_fn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176997"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177014"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (OccName, Fingerprint)
-&gt; (OccName, Fingerprint) -&gt; (OccName, Fingerprint)
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span>
</span><span id="line-1455"></span><span>                  </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; (OccName, Fingerprint)
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lookupVers1&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176998"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681177014"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1456"></span><span>
</span><span id="line-1457"></span><span>
</span><span id="line-1458"></span><span class="hs-comment">-- | Creates cached lookup for the 'mi_anns' field of ModIface</span><span>
</span><span id="line-1459"></span><span class="hs-comment">-- Hackily, we use &quot;module&quot; as the OccName for any module-level annotations</span><span>
</span><span id="line-1460"></span><span class="annot"><a href="GHC.Iface.Recomp.html#mkIfaceAnnCache"><span class="hs-identifier hs-type">mkIfaceAnnCache</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAnnotation"><span class="hs-identifier hs-type">IfaceAnnotation</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Annotations.html#AnnPayload"><span class="hs-identifier hs-type">AnnPayload</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1461"></span><span id="mkIfaceAnnCache"><span class="annot"><span class="annottext">mkIfaceAnnCache :: [IfaceAnnotation] -&gt; OccName -&gt; [AnnPayload]
</span><a href="GHC.Iface.Recomp.html#mkIfaceAnnCache"><span class="hs-identifier hs-var hs-var">mkIfaceAnnCache</span></a></span></span><span> </span><span id="local-6989586621681176994"><span class="annot"><span class="annottext">[IfaceAnnotation]
</span><a href="#local-6989586621681176994"><span class="hs-identifier hs-var">anns</span></a></span></span><span>
</span><span id="line-1462"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681176993"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681176993"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">OccEnv [AnnPayload] -&gt; OccName -&gt; Maybe [AnnPayload]
forall a. OccEnv a -&gt; OccName -&gt; Maybe a
</span><a href="GHC.Types.Name.Occurrence.html#lookupOccEnv"><span class="hs-identifier hs-var">lookupOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv [AnnPayload]
</span><a href="#local-6989586621681176992"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681176993"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [AnnPayload] -&gt; [AnnPayload] -&gt; [AnnPayload]
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1463"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1464"></span><span>    </span><span id="local-6989586621681176991"><span class="annot"><span class="annottext">pair :: IfaceAnnotation -&gt; (OccName, [AnnPayload])
</span><a href="#local-6989586621681176991"><span class="hs-identifier hs-var hs-var">pair</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAnnotation"><span class="hs-identifier hs-type">IfaceAnnotation</span></a></span><span> </span><span id="local-6989586621681176989"><span class="annot"><span class="annottext">IfaceAnnTarget
</span><a href="#local-6989586621681176989"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span id="local-6989586621681176988"><span class="annot"><span class="annottext">AnnPayload
</span><a href="#local-6989586621681176988"><span class="hs-identifier hs-var">value</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1465"></span><span>      </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IfaceAnnTarget
</span><a href="#local-6989586621681176989"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1466"></span><span>          </span><span class="annot"><a href="GHC.Types.Annotations.html#NamedTarget"><span class="hs-identifier hs-type">NamedTarget</span></a></span><span> </span><span id="local-6989586621681176986"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681176986"><span class="hs-identifier hs-var">occn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681176986"><span class="hs-identifier hs-var">occn</span></a></span><span>
</span><span id="line-1467"></span><span>          </span><span class="annot"><a href="GHC.Types.Annotations.html#ModuleTarget"><span class="hs-identifier hs-type">ModuleTarget</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkVarOcc"><span class="hs-identifier hs-var">mkVarOcc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;module&quot;</span></span><span>
</span><span id="line-1468"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">AnnPayload
</span><a href="#local-6989586621681176988"><span class="hs-identifier hs-var">value</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1469"></span><span>    </span><span class="hs-comment">-- flipping (++), so the first argument is always short</span><span>
</span><span id="line-1470"></span><span>    </span><span id="local-6989586621681176992"><span class="annot"><span class="annottext">env :: OccEnv [AnnPayload]
</span><a href="#local-6989586621681176992"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([AnnPayload] -&gt; [AnnPayload] -&gt; [AnnPayload])
-&gt; [(OccName, [AnnPayload])] -&gt; OccEnv [AnnPayload]
forall a. (a -&gt; a -&gt; a) -&gt; [(OccName, a)] -&gt; OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#mkOccEnv_C"><span class="hs-identifier hs-var">mkOccEnv_C</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([AnnPayload] -&gt; [AnnPayload] -&gt; [AnnPayload])
-&gt; [AnnPayload] -&gt; [AnnPayload] -&gt; [AnnPayload]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnPayload] -&gt; [AnnPayload] -&gt; [AnnPayload]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">(++)</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceAnnotation -&gt; (OccName, [AnnPayload]))
-&gt; [IfaceAnnotation] -&gt; [(OccName, [AnnPayload])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceAnnotation -&gt; (OccName, [AnnPayload])
</span><a href="#local-6989586621681176991"><span class="hs-identifier hs-var">pair</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceAnnotation]
</span><a href="#local-6989586621681176994"><span class="hs-identifier hs-var">anns</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1471"></span></pre></body></html>